summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-06-24 12:36:50 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2023-06-24 19:09:26 +0200
commit7297cd808b142c522d7d6bcfa30bf61a3a25127c (patch)
tree4d197bd6e6fc7357aae6b970ce8393a13ec29d9e /src/corelib/thread/qthread.cpp
parent838fc606c170fac112f7bb5971c2507b7b56d08a (diff)
QtCore: code tidies: use the 4-arg connect overload
The 3-arg connect is error-prone and makes the lifetime of the connection unclear. Change-Id: I4f2b54bc086e8f4723a0357d983e3df2f85135ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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 9f00bf407d..61369420d1 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -1245,7 +1245,9 @@ QDaemonThread::QDaemonThread(QObject *parent)
{
// QThread::started() is emitted from the thread we start
connect(this, &QThread::started,
- [](){ QThreadData::current()->requiresCoreApplication = false; });
+ this,
+ [](){ QThreadData::current()->requiresCoreApplication = false; },
+ Qt::DirectConnection);
}
QDaemonThread::~QDaemonThread()