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>
This commit is contained in:
parent
0d9f43d534
commit
e9190eda1a
@ -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}
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user