summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2010-01-21 21:28:09 +0100
committerDaniel Molkentin <daniel.molkentin@nokia.com>2010-01-21 21:28:09 +0100
commit56aac18bd804bab35e344ea9e896815766e1f45c (patch)
tree27f995b7a92d5d2d396d9052d94c3d47eff4ff58 /src
parentc4d1553da4553da65ea7877af6ae7441528f1134 (diff)
downloadqt-creator-56aac18bd804bab35e344ea9e896815766e1f45c.tar.gz
Extend QSettings workaround to Windows.
Diffstat (limited to 'src')
-rw-r--r--src/app/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index 6293c29cc0..e702fe022a 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -184,11 +184,17 @@ int main(int argc, char **argv)
// Must be done before any QSettings class is created
QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope,
QCoreApplication::applicationDirPath()+QLatin1String(SHARE_PATH));
+
+ // Work around bug in QSettings which gets triggered on Windows & Mac only
#ifdef Q_OS_MAC
- // Work around bug in QSettings
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope,
QDir::homePath()+"/.config");
#endif
+#ifdef Q_OS_WIN
+ QSettings::setPath(QSettings::IniFormat, QSettings::UserScope,
+ qgetenv("appdata"));
+#endif
+
// keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp
const QSettings settings(QSettings::IniFormat, QSettings::UserScope,
QLatin1String("Nokia"), QLatin1String("QtCreator"));