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/qqmlcomponent.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/qqmlcomponent.h')
-rw-r--r-- | src/qml/qml/qqmlcomponent.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlcomponent.h b/src/qml/qml/qqmlcomponent.h index 8c866c585a..121c83db5c 100644 --- a/src/qml/qml/qqmlcomponent.h +++ b/src/qml/qml/qqmlcomponent.h @@ -63,8 +63,8 @@ class Q_QML_EXPORT QQmlComponent : public QObject Q_PROPERTY(QUrl url READ url CONSTANT) public: - Q_ENUMS(CompilationMode) enum CompilationMode { PreferSynchronous, Asynchronous }; + Q_ENUM(CompilationMode) QQmlComponent(QObject *parent = 0); QQmlComponent(QQmlEngine *, QObject *parent=0); @@ -74,8 +74,8 @@ public: QQmlComponent(QQmlEngine *, const QUrl &url, CompilationMode mode, QObject *parent = 0); virtual ~QQmlComponent(); - Q_ENUMS(Status) enum Status { Null, Ready, Loading, Error }; + Q_ENUM(Status) Status status() const; bool isNull() const; @@ -125,7 +125,6 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QQmlComponent::Status) QML_DECLARE_TYPE(QQmlComponent) QML_DECLARE_TYPEINFO(QQmlComponent, QML_HAS_ATTACHED_PROPERTIES) |