diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 14 | ||||
-rw-r--r-- | src/corelib/kernel/qtestsupport_core.cpp | 6 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 600a801fe0..73b8c33efe 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4342,6 +4342,12 @@ QDebug operator<<(QDebug dbg, const QObject *o) in a QVariant, you can convert them to strings. Likewise, passing them to QDebug will print out their names. + Mind that the enum values are stored as signed \c int in the meta object system. + Registering enumerations with values outside the range of values valid for \c int + will lead to overflows and potentially undefined behavior when accessing them through + the meta object system. QML, for example, does access registered enumerations through + the meta object system. + \sa {Qt's Property System} */ @@ -4393,6 +4399,12 @@ QDebug operator<<(QDebug dbg, const QObject *o) used in a QVariant, you can convert them to strings. Likewise, passing them to QDebug will print out their names. + Mind that the enum values are stored as signed \c int in the meta object system. + Registering enumerations with values outside the range of values valid for \c int + will lead to overflows and potentially undefined behavior when accessing them through + the meta object system. QML, for example, does access registered enumerations through + the meta object system. + \sa {Qt's Property System} */ @@ -4450,7 +4462,7 @@ QDebug operator<<(QDebug dbg, const QObject *o) macro, it must appear in the private section of a class definition. Q_GADGETs can have Q_ENUM, Q_PROPERTY and Q_INVOKABLE, but they cannot have - signals or slots + signals or slots. Q_GADGET makes a class member, \c{staticMetaObject}, available. \c{staticMetaObject} is of type QMetaObject and provides access to the diff --git a/src/corelib/kernel/qtestsupport_core.cpp b/src/corelib/kernel/qtestsupport_core.cpp index e00ad75fef..c54b933f94 100644 --- a/src/corelib/kernel/qtestsupport_core.cpp +++ b/src/corelib/kernel/qtestsupport_core.cpp @@ -59,8 +59,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms) #endif } -/*! \fn template <typename Functor> bool qWaitFor(Functor predicate, int timeout) - \relates QTest +/*! \fn template <typename Functor> bool QTest::qWaitFor(Functor predicate, int timeout) Waits for \a timeout milliseconds or until the \a predicate returns true. @@ -77,8 +76,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms) */ -/*! \fn void qWait(int ms) - \relates QTest +/*! \fn void QTest::qWait(int ms) Waits for \a ms milliseconds. While waiting, events will be processed and your test will stay responsive to user interface events or network communication. |