Index: main.cpp =================================================================== diff -u -ra522e6aa7a36ac696a9a956200e89d838f319e25 -rd9b9df9b23da89b4c27f4672ff6e7f570adcc48a --- main.cpp (.../main.cpp) (revision a522e6aa7a36ac696a9a956200e89d838f319e25) +++ main.cpp (.../main.cpp) (revision d9b9df9b23da89b4c27f4672ff6e7f570adcc48a) @@ -548,24 +548,32 @@ // SYSTEM TEST FOR INSTRUCTIONS WHEN THERE IS NO PORT AVAILABLE // Storage::FileHandler::copyFolder(QString(Storage::USB_Mount_Point) + "Instructions", QString(Storage::Settings_Path())); - //! - Translation initialization - //! AMIR - //! - Storage::Settings settings; - settings.loadTranslation(); - //! - Initializing required thread types Threads::registerTypes(); - bool guiStarted = startGui(); - //! - Initializing Logger if(_Logger.init(Threads::_Logger_Thread)) { _Logger.enableConsoleOut(gConsoleoutLogs); } _Logger.postInit(); + // That is enough to call to the I function here to create the object in the thread that Settings is leaving in, + // which currently is Application_Thread, since the Settings is created in that thread. + _Settings; + QTranslator translator; + { // on-shot use of settings to load the translation only + // Storage::Settings settings; + //! - Reading localization + if ( ! Storage::Settings::readLocale() ) { + //! - Translation initialization + Storage::Settings::loadTranslation(translator); + } + } + + //! - Starting the application interface + bool guiStarted = startGui(); + if (gFakeInterval) { QString msg = " ~~ !!!!! APPLICATION RUNNING IN THE TEST MODE !!!!! ~~ "; qDebug() << msg;