Move QThread::currentThreadId() down to the loop using it.
This prevents the call from happening in case no C++ signal is connected. Change-Id: I32027df446391f3fc979528738a106223042d632 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
1735ca57a8
commit
9d0dbc32dd
@ -3628,8 +3628,6 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
|
|||||||
argv ? argv : empty_argv);
|
argv ? argv : empty_argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt::HANDLE currentThreadId = QThread::currentThreadId();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
QMutexLocker locker(signalSlotLock(sender));
|
QMutexLocker locker(signalSlotLock(sender));
|
||||||
struct ConnectionListsRef {
|
struct ConnectionListsRef {
|
||||||
@ -3668,6 +3666,8 @@ void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_i
|
|||||||
else
|
else
|
||||||
list = &connectionLists->allsignals;
|
list = &connectionLists->allsignals;
|
||||||
|
|
||||||
|
Qt::HANDLE currentThreadId = QThread::currentThreadId();
|
||||||
|
|
||||||
do {
|
do {
|
||||||
QObjectPrivate::Connection *c = list->first;
|
QObjectPrivate::Connection *c = list->first;
|
||||||
if (!c) continue;
|
if (!c) continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user