diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-13 09:59:40 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-06-19 10:01:35 +0000 |
commit | 1bedf1aead29cd3030969e855958185990def071 (patch) | |
tree | 7a859e82baab5726bab644b9d389b7ed06d6963b /src/qml/qml/qqmllocale_p.h | |
parent | de93307ab6acc965d6db5a0ca835e6bd544af6d2 (diff) |
Port from Q_ENUMS to new macro Q_ENUM.
Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration
as meta enum and a debug stream operator.
QQuickXmlListModel::Status is left unmodified as porting it creates
a link error in tst_qquickxmllistmodel.
Change-Id: Id5e6192c9f85e7c94332508fbd91873ddda31e1a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/qml/qml/qqmllocale_p.h')
-rw-r--r-- | src/qml/qml/qqmllocale_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmllocale_p.h b/src/qml/qml/qqmllocale_p.h index d035544329..cb9fe9bbef 100644 --- a/src/qml/qml/qqmllocale_p.h +++ b/src/qml/qml/qqmllocale_p.h @@ -74,10 +74,6 @@ private: class Q_AUTOTEST_EXPORT QQmlLocale { Q_GADGET - Q_ENUMS(MeasurementSystem) - Q_ENUMS(FormatType) - Q_ENUMS(CurrencySymbolFormat) - Q_ENUMS(DayOfWeek) public: ~QQmlLocale(); @@ -88,16 +84,19 @@ public: ImperialUSSystem = QLocale::ImperialUSSystem, ImperialUKSystem = QLocale::ImperialUKSystem }; + Q_ENUM(MeasurementSystem) enum FormatType { LongFormat = QLocale::LongFormat, ShortFormat = QLocale::ShortFormat, NarrowFormat = QLocale::NarrowFormat }; + Q_ENUM(FormatType) enum CurrencySymbolFormat { CurrencyIsoCode = QLocale::CurrencyIsoCode, CurrencySymbol = QLocale::CurrencySymbol, CurrencyDisplayName = QLocale::CurrencyDisplayName }; + Q_ENUM(CurrencySymbolFormat) // Qt defines Sunday as 7, but JS Date assigns Sunday 0 enum DayOfWeek { Sunday = 0, @@ -108,6 +107,7 @@ public: Friday = Qt::Friday, Saturday = Qt::Saturday }; + Q_ENUM(DayOfWeek) static QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName); static QV4::ReturnedValue wrap(QV4::ExecutionEngine *engine, const QLocale &locale); |