diff options
author | Topi Reinio <topi.reinio@qt.io> | 2023-05-08 13:11:14 +0000 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2023-05-09 16:37:33 +0000 |
commit | 8cf277e3f21d8170964363888ebb6f01c730f013 (patch) | |
tree | 507c59ed57d18d500cadf4dc2fa3a9a0f7daba19 | |
parent | 2a9f5d33a41cdac0c6d11bb604eb58f7668bd80a (diff) | |
download | qtdoc-8cf277e3f21d8170964363888ebb6f01c730f013.tar.gz |
Doc: Replace mentions of deprecated macros
Q_ENUMS() and Q_FLAGS() are deprecated in favor of Q_ENUM() and
Q_FLAG().
Also, remove unused code snippets that use the old macros.
Pick-to: 6.5
Task-number: QTBUG-113229
Change-Id: I42c47128ddcf0073ba3493a6c59e143f0e9753c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
-rw-r--r-- | doc/src/development/moc.qdoc | 2 | ||||
-rw-r--r-- | doc/src/snippets/code/src_corelib_kernel_qobject.cpp | 25 | ||||
-rw-r--r-- | doc/src/snippets/moc/myclass2.h | 2 |
3 files changed, 2 insertions, 27 deletions
diff --git a/doc/src/development/moc.qdoc b/doc/src/development/moc.qdoc index 92f8bdf4..19567bfd 100644 --- a/doc/src/development/moc.qdoc +++ b/doc/src/development/moc.qdoc @@ -46,7 +46,7 @@ \snippet snippets/moc/myclass2.h 0 - The Q_FLAGS() macro declares enums that are to be used + The Q_FLAG() macro declares enums that are to be used as flags, i.e. OR'd together. Another macro, Q_CLASSINFO(), allows you to attach additional name/value pairs to the class's meta-object: diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp index b4e17510..0e173d44 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp @@ -346,31 +346,6 @@ Q_PROPERTY(QString title READ title WRITE setTitle USER true) //! [37] -//! [38] -class MyClass : public QObject -{ - Q_OBJECT - Q_ENUMS(Priority) - -public: - MyClass(QObject *parent = 0); - ~MyClass(); - - enum Priority { High, Low, VeryHigh, VeryLow }; - void setPriority(Priority priority); - Priority priority() const; -}; -//! [38] - - -//! [39a] -class QLibrary : public QObject -{ - ... - Q_FLAGS(LoadHint LoadHints) - ... -//! [39a] - //! [39b] ... public: diff --git a/doc/src/snippets/moc/myclass2.h b/doc/src/snippets/moc/myclass2.h index 226e81aa..395b0cc9 100644 --- a/doc/src/snippets/moc/myclass2.h +++ b/doc/src/snippets/moc/myclass2.h @@ -13,10 +13,10 @@ class MyClass : public QObject { Q_OBJECT Q_PROPERTY(Priority priority READ priority WRITE setPriority) - Q_ENUMS(Priority) public: enum Priority { High, Low, VeryHigh, VeryLow }; + Q_ENUM(Priority) MyClass(QObject *parent = 0); ~MyClass(); |