History

don't force use of Settings to all QCoreApplication

Stephen Birarda committed 11 years ago

Commit ddb52341 parent 83cd50c5 files · +14 −11Browse files

Showing the changes to libraries/shared/src/SettingInterface.cpp (1 of 5 files). Show all

Unified · Split

libraries/shared/src/SettingInterface.cpp+4−7
@@ -36,7 +36,7 @@ namespace Setting { · 35 unmodified lines
3636 }
3737
3838 // Sets up the settings private instance. Should only be run once at startup
39− void setupPrivateInstance() {
39+ void init() {
4040 // read the ApplicationInfo.ini file for Name/Version/Domain information
4141 QSettings::setDefaultFormat(QSettings::IniFormat);
4242 QSettings applicationInfo(PathUtils::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
@@ -59,14 +59,11 @@ namespace Setting { · 16 unmodified lines
5959 QObject::connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
6060 privateInstance->moveToThread(thread);
6161 thread->start();
62− qCDebug(shared) << "Settings thread started.";
63−
62+ qCDebug(shared) << "Settings thread started.";
63+
6464 // Register cleanupPrivateInstance to run inside QCoreApplication's destructor.
6565 qAddPostRoutine(cleanupPrivateInstance);
66− }
67− // Register setupPrivateInstance to run after QCoreApplication's constructor.
68− Q_COREAPP_STARTUP_FUNCTION(setupPrivateInstance)
69−
66+ }
7067
7168 Interface::~Interface() {
7269 if (privateInstance) {