unsafe fn load_icon_paths(&self) -> Result<()> {
        let receiver = CENTRAL_COMMAND.send_background(Command::GetPackedFilesNamesStartingWitPathFromAllSources(PathType::Folder(UNIT_ICONS_PATH.split("/").map(|x| x.to_owned()).collect())));
        let response = CentralCommand::recv(&receiver);
        let icon_keys = if let Response::HashMapDataSourceHashSetVecString(data) = response { data } else { panic!("{}{:?}", THREADS_COMMUNICATION_ERROR, response); };
        let icon_keys_sorted = icon_keys.values()
            .map(|paths|
                paths.par_iter()
                .map(|path| path.join("/"))
                .collect::<Vec<String>>()
            )
            .flatten()
            .sorted()
            .collect::<Vec<String>>();

        self.unit_variants_unit_card_combobox.add_item_q_string(&QString::from_std_str(""));
        for icon_key in &icon_keys_sorted {
            let name_without_extension = icon_key.split('.').collect::<Vec<&str>>()[0];
            self.unit_variants_unit_card_combobox.add_item_q_string(&QString::from_std_str(name_without_extension));
        }

        Ok(())
    }
/// This function loads all available icon paths to the UI.
This function loads all available icon paths to the UI.
This function loads all available icon paths to the UI .
unsafe fn load_icon_paths(&self) -> Result<()> {
        let receiver = CENTRAL_COMMAND.send_background(Command::GetPackedFilesNamesStartingWitPathFromAllSources(PathType::Folder(UNIT_ICONS_PATH.split("/").map(|x| x.to_owned()).collect())));
        let response = CentralCommand::recv(&receiver);
        let icon_keys = if let Response::HashMapDataSourceHashSetVecString(data) = response { data } else { panic!("{}{:?}", THREADS_COMMUNICATION_ERROR, response); };
        let icon_keys_sorted = icon_keys.values()
            .map(|paths|
                paths.par_iter()
                .map(|path| path.join("/"))
                .collect::<Vec<String>>()
            )
            .flatten()
            .sorted()
            .collect::<Vec<String>>();
        self.unit_variants_unit_card_combobox.add_item_q_string(&QString::from_std_str(""));
        for icon_key in &icon_keys_sorted {
            let name_without_extension = icon_key.split('.').collect::<Vec<&str>>()[0];
            self.unit_variants_unit_card_combobox.add_item_q_string(&QString::from_std_str(name_without_extension));
        }
        Ok(())
    }
unsafe fn load_icon_paths ( & self ) -> Result < ( ) > { let receiver = CENTRAL_COMMAND . send_background ( Command :: GetPackedFilesNamesStartingWitPathFromAllSources ( PathType :: Folder ( UNIT_ICONS_PATH . split ( " " ) . map ( | x | x . to_owned ( ) ) . collect ( ) ) ) ) ; let response = CentralCommand :: recv ( & receiver ) ; let icon_keys = if let Response :: HashMapDataSourceHashSetVecString ( data ) = response { data } else { panic ! ( " " THREADS_COMMUNICATION_ERROR response ) ; } ; let icon_keys_sorted = icon_keys . values ( ) . map ( | paths | paths . par_iter ( ) . map ( | path | path . join ( " " ) ) . collect :: < Vec < String > > ( ) ) . flatten ( ) . sorted ( ) . collect :: < Vec < String > > ( ) ; self . unit_variants_unit_card_combobox . add_item_q_string ( & QString :: from_std_str ( " " ) ) ; for icon_key in & icon_keys_sorted { let name_without_extension = icon_key . split ( '.' ) . collect :: < Vec < & str > > ( ) [ 0 ] ; self . unit_variants_unit_card_combobox . add_item_q_string ( & QString :: from_std_str ( name_without_extension ) ) ; } Ok ( ( ) ) }
This function loads all available icon paths to the UI.
This function loads all available icon paths to the UI .
&self
&self