QSignalSpy: use NSDMI for m_waiting
One step closer to DRYing the ctors. Pick-to: 6.7 6.6 6.5 Task-number: QTBUG-123544 Change-Id: Iff73fe70e3d2de52548d10b2f38a7ba2bd7029cd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
a90c3cc3c7
commit
b97bcdd774
|
|
@ -21,7 +21,6 @@ class QSignalSpy: public QObject, public QList<QList<QVariant> >
|
|||
{
|
||||
public:
|
||||
explicit QSignalSpy(const QObject *obj, const char *aSignal)
|
||||
: m_waiting(false)
|
||||
{
|
||||
if (!isObjectValid(obj))
|
||||
return;
|
||||
|
|
@ -57,7 +56,6 @@ public:
|
|||
#else
|
||||
template <typename Func>
|
||||
QSignalSpy(const typename QtPrivate::FunctionPointer<Func>::Object *obj, Func signal0)
|
||||
: m_waiting(false)
|
||||
{
|
||||
if (!isObjectValid(obj))
|
||||
return;
|
||||
|
|
@ -83,7 +81,6 @@ public:
|
|||
#endif // Q_QDOC
|
||||
|
||||
QSignalSpy(const QObject *obj, const QMetaMethod &signal)
|
||||
: m_waiting(false)
|
||||
{
|
||||
if (isObjectValid(obj) && isSignalMetaMethodValid(signal)) {
|
||||
initArgs(signal, obj);
|
||||
|
|
@ -214,7 +211,7 @@ private:
|
|||
QList<int> args;
|
||||
|
||||
QTestEventLoop m_loop;
|
||||
bool m_waiting;
|
||||
bool m_waiting = false;
|
||||
QMutex m_mutex; // protects m_waiting, args and the QList base class, between appendArgs() and wait()
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue