summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-09-09 10:43:27 +0200
committerPaul Wicking <paul.wicking@qt.io>2019-09-20 09:07:50 +0200
commite9190eda1a2b16bd6aa07cce4e00f302eeb3562e (patch)
tree779ccc580678aaa3eae781f8fbe5bb13a0d84094
parent0d9f43d534983411e37a9f3912de272a4a6ced64 (diff)
Doc: Remove broken example snippet from Q_ENUMS
The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore, remove the example snippet from Q_ENUMS documentation, as it is obsolete. Also, move recommendation to use Q_ENUM in new code to the very top of Q_ENUMS' documentation. Fixes: QTBUG-63203 Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r--src/corelib/kernel/qobject.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 1f5b61c978..598ce75bd4 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4291,22 +4291,18 @@ QDebug operator<<(QDebug dbg, const QObject *o)
\relates QObject
\obsolete
+ In new code, you should prefer the use of the Q_ENUM() macro, which makes the
+ type available also to the meta type system.
+ For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
+
This macro registers one or several enum types to the meta-object
system.
- For example:
-
- \snippet code/src_corelib_kernel_qobject.cpp 38
-
If you want to register an enum that is declared in another class,
the enum must be fully qualified with the name of the class
defining it. In addition, the class \e defining the enum has to
inherit QObject as well as declare the enum using Q_ENUMS().
- In new code, you should prefer the use of the Q_ENUM() macro, which makes the
- type available also to the meta type system.
- For instance, QMetaEnum::fromType() will not work with types declared with Q_ENUMS().
-
\sa {Qt's Property System}
*/