QAbstractMetaCallEvent: fix compilation with out feature.thread on Clang

Clang warns that the private field semaphore_ is unused, and is correct,
of course.

Change-Id: Ic1372cedd3f4b2facca9f6f6be398d26f406b379
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
bb10
Marc Mutz 2019-07-13 00:22:54 +02:00
parent 319e0f097d
commit 944c5f40b3
1 changed files with 7 additions and 2 deletions

View File

@ -486,8 +486,11 @@ class Q_CORE_EXPORT QAbstractMetaCallEvent : public QEvent
{
public:
QAbstractMetaCallEvent(const QObject *sender, int signalId, QSemaphore *semaphore = nullptr)
: QEvent(MetaCall), signalId_(signalId), sender_(sender), semaphore_(semaphore)
{}
: QEvent(MetaCall), signalId_(signalId), sender_(sender)
#if QT_CONFIG(thread)
, semaphore_(semaphore)
#endif
{ Q_UNUSED(semaphore); }
~QAbstractMetaCallEvent();
virtual void placeMetaCall(QObject *object) = 0;
@ -498,7 +501,9 @@ public:
private:
int signalId_;
const QObject *sender_;
#if QT_CONFIG(thread)
QSemaphore *semaphore_;
#endif
};
class Q_CORE_EXPORT QMetaCallEvent : public QAbstractMetaCallEvent