diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-04-15 10:31:24 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-05-06 19:46:06 +0000 |
commit | fb5530cd691699c96aa035e430459faf00dfb513 (patch) | |
tree | a1d9cfacc9e301dc4046fe366d8f2788acfc9f7a /src/corelib/io/qsettings.cpp | |
parent | ae050611b4004220071cc49e456bc444d9679ddc (diff) |
QSettings: use QStandardPath to resolve path on iOS
The current solution hard-codes a settings path that on iOS
will point to a write protected path inside the sandbox. So
change the QSP fallback in QSettings to also include iOS.
Note that changing settings path would normally be problematic
since it would cause migration issues. However, since the
current solution can never have worked on iOS, starting
to use QSP now should be fine.
Change-Id: Iecad7d84595aee24ca0e2446fa5997296ad8b5a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qsettings.cpp')
-rw-r--r-- | src/corelib/io/qsettings.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index afe68125d4..413f5693f0 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -104,6 +104,10 @@ using namespace ABI::Windows::Storage; #define Q_XDG_PLATFORM #endif +#if !defined(QT_NO_STANDARDPATHS) && (defined(Q_XDG_PLATFORM) || defined(Q_OS_IOS)) +#define QSETTINGS_USE_QSTANDARDPATHS +#endif + // ************************************************************************ // QConfFile @@ -1044,7 +1048,7 @@ static void initDefaultPaths(QMutexLocker *locker) windowsConfigPath(CSIDL_COMMON_APPDATA) + QDir::separator()); #else -#if defined(QT_NO_STANDARDPATHS) || !defined(Q_XDG_PLATFORM) +#ifndef QSETTINGS_USE_QSTANDARDPATHS // Non XDG platforms (OS X, iOS, Blackberry, Android...) have used this code path erroneously // for some time now. Moving away from that would require migrating existing settings. QString userPath; |