diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-09-29 16:19:28 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-10-05 18:45:04 +0000 |
commit | fd7e00aff50c9ced966004238b2f74672dbbe300 (patch) | |
tree | c52d22d48f8e242bb8edc7a4a4ccb409ba9b64f6 /src/corelib/io/qsettings.h | |
parent | 764f5bf48cc87f4c72550b853ab93b815454cd48 (diff) |
Don't truncate QDateTime milliseconds when storing QSettings on Apple platforms
The fix is trivial, but the patch adds a new QSettings tests that iterates most
of the QMetaTypes and verifies that storing and retrieving them again gives the
same value. This is a more complete test than the testVariantTypes tests, which
is limited to a subset of the QVariant types. The new tests borrows logic from
the QMetaType test machinery.
QSettings has been Q_ENUM'ified in the process, for improved debug output.
Note that on backends such as the INI backend, the metatype of the QVariant read
from the settings will be a string, so it won't match the input QVariant type,
but the result of converting that to the original value type should still work.
Task-number: QTBUG-56124
Change-Id: Ib03a26abf77c9fb449b94160d28bc4baeb095f25
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/corelib/io/qsettings.h')
-rw-r--r-- | src/corelib/io/qsettings.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/io/qsettings.h b/src/corelib/io/qsettings.h index 21fb9519de..edd59026ed 100644 --- a/src/corelib/io/qsettings.h +++ b/src/corelib/io/qsettings.h @@ -80,6 +80,9 @@ public: AccessError, FormatError }; +#ifndef QT_NO_QOBJECT + Q_ENUM(Status) +#endif enum Format { NativeFormat, @@ -108,11 +111,17 @@ public: CustomFormat15, CustomFormat16 }; +#ifndef QT_NO_QOBJECT + Q_ENUM(Format) +#endif enum Scope { UserScope, SystemScope }; +#ifndef QT_NO_QOBJECT + Q_ENUM(Scope) +#endif #ifndef QT_NO_QOBJECT explicit QSettings(const QString &organization, |