Skip to content

Commit 8e5e97e

Browse files
committed
fix: correctly load config in standalone builds
1 parent b2fafbf commit 8e5e97e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/hobbits-core/settingsmanager.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,15 @@ void SettingsManager::readSettings()
8888
QMutexLocker lock(&instance().m_mutex);
8989

9090
if (instance().m_configFilePath.isEmpty()) {
91+
#if SELF_CONTAINED_APP
92+
QString appDirPath = QCoreApplication::applicationDirPath();
93+
if (!appDirPath.isEmpty()) {
94+
appDirPath += "/";
95+
}
96+
QSettings settings(appDirPath + "config.ini", QSettings::IniFormat);
97+
#else
9198
QSettings settings("Hobbits", "Hobbits GUI");
99+
#endif
92100
instance().readFromSettings(settings);
93101
}
94102
else {

0 commit comments

Comments
 (0)