diff options
author | Liang Qi <liang.qi@qt.io> | 2019-01-26 08:35:40 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-01-26 08:35:40 +0100 |
commit | 980567b3a32b2e2f00c86f2d627cd82b5230dd0f (patch) | |
tree | bc8cc4005b2e07cbc5cad8ba30f8c9fa4f236c3d /src/corelib/kernel/qobject.cpp | |
parent | e81acde7d0cf5fb44a3fb2cf0bf7aaa2c65f807e (diff) | |
parent | 730cbad8824bcfcb7ab60371a6563cfb6dd5658d (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/android/templates/AndroidManifest.xml
tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 14 |
1 files changed, 13 insertions, 1 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 |