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>
This commit is contained in:
parent
ae050611b4
commit
fb5530cd69
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user