QSignalSpy: use NSDMI for m_waiting
One step closer to DRYing the ctors. Pick-to: 6.6 6.5 Task-number: QTBUG-123544 Change-Id: Iff73fe70e3d2de52548d10b2f38a7ba2bd7029cd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit b97bcdd7743485418c26cf37d6ed6ea31ce94376)
This commit is contained in:
parent
e25a60599f
commit
b131310273
@ -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;
|
||||
static inline QMutex m_mutex; // protects m_waiting, args and the QList base class, between appendArgs() and wait()
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user