summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:59:33 +0100
commit3f3be55835427ea9f1bbcc046e05ee538ca214d7 (patch)
tree09d1f54d114855c2b06cc505dfbf74c5890c8419 /src/corelib/kernel/qobject.cpp
parentae293c1cb220847194fba6dcebdbb9194837bb56 (diff)
parent9764f8602719676d1fa15e6fd1e7980af16bfc63 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 5880b96f32..8e0dc4dede 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -194,9 +194,15 @@ QMetaObject *QObjectData::dynamicMetaObject() const
QObjectPrivate::QObjectPrivate(int version)
: threadData(0), connectionLists(0), senders(0), currentSender(0), currentChildBeingDeleted(0)
{
+#ifdef QT_BUILD_INTERNAL
+ // Don't check the version parameter in internal builds.
+ // This allows incompatible versions to be loaded, possibly for testing.
+ Q_UNUSED(version);
+#else
if (version != QObjectPrivateVersion)
qFatal("Cannot mix incompatible Qt library (version 0x%x) with this library (version 0x%x)",
version, QObjectPrivateVersion);
+#endif
// QObjectData initialization
q_ptr = 0;
@@ -3090,6 +3096,10 @@ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal,
expensive initialization only if something is connected to a
signal.
+ \warning This function is called from the thread which performs the
+ connection, which may be a different thread from the thread in
+ which this object lives.
+
\sa connect(), disconnectNotify()
*/
@@ -3116,6 +3126,15 @@ void QObject::connectNotify(const QMetaMethod &signal)
modularity. However, it might be useful for optimizing access to
expensive resources.
+ \warning This function is called from the thread which performs the
+ disconnection, which may be a different thread from the thread in
+ which this object lives. This function may also be called with a QObject
+ internal mutex locked. It is therefore not allowed to re-enter any
+ of any QObject functions from your reimplementation and if you lock
+ a mutex in your reimplementation, make sure that you don't call QObject
+ functions with that mutex held in other places or it will result in
+ a deadlock.
+
\sa disconnect(), connectNotify()
*/