From 3b03150aa2af76b13424c988c6c7892d19cce6c5 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 12 Dec 2018 12:36:39 +0100 Subject: Doc: Restore documentation for QTest functions in other modules Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith --- src/corelib/kernel/qtestsupport_core.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qtestsupport_core.cpp b/src/corelib/kernel/qtestsupport_core.cpp index d69551a227..aba2a136a1 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 bool qWaitFor(Functor predicate, int timeout) - \relates QTest +/*! \fn template 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. -- cgit v1.2.3 From 119487650e28073f5766cc43cb679eb629a2a0c5 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 15 Jan 2019 15:32:44 +0100 Subject: Doc: End sentence about Q_GADGET with dot Change-Id: I55380d133017670f212df331fba655e80538e412 Reviewed-by: Leena Miettinen --- src/corelib/kernel/qobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index b5d97c5538..4680742a3e 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4446,7 +4446,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 -- cgit v1.2.3 From 4faf011c3f5f4a739f4ddc54040b5319f7fe5d90 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 10 Jan 2019 17:38:55 +0100 Subject: Document that you shouldn't Q_ENUM() things outside the int range The meta object system stores enums as signed int, probably for performance reasons. This is good enough for about 99% of the use cases. If you try to register larger types and then access them through the metaobject system, you can get undefined behavior. Task-number: QTBUG-71947 Change-Id: I16b395547c22fad10b476c2c2a0768538db0a20e Reviewed-by: Thiago Macieira --- src/corelib/kernel/qobject.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 4680742a3e..42c39f18e3 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4338,6 +4338,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} */ @@ -4389,6 +4395,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} */ -- cgit v1.2.3