summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-11-12 09:15:26 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-11-14 16:55:44 -0800
commit43a27888b47e1199c9f12a1c2ce7ab9b073e8a46 (patch)
treeb34fef674088064986a8b24aa0417075af134336 /src/corelib/thread/qthread.cpp
parentf2b5c779cdee1afabca300b04187955c0009fe1c (diff)
QAdoptedThread: bypass signal notification on an un-observable QObject
We've just created the object (we're still inside the constructor). No one can have connected to the signals yet. Change-Id: I1f499b3fc6d2089665bdfffda709e1efaa2c4865 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index ae280e3671b..723bd4b0da4 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -126,7 +126,9 @@ QAdoptedThread::QAdoptedThread(QThreadData *data)
// we are the main thread
QCoreApplicationPrivate::theMainThread.storeRelease(this);
QCoreApplicationPrivate::theMainThreadId.storeRelaxed(id);
- setObjectName(u"Qt mainThread"_s);
+
+ // bypass the bindings because nothing can be listening yet
+ d_func()->setObjectNameWithoutBindings(u"Qt mainThread"_s);
}
// thread should be running and not finished for the lifetime