Details
-
Task
-
Resolution: Fixed
-
P2: Important
-
None
-
None
-
8
-
b97bcdd77 (dev), d5d2688ac (dev), edb8bac39 (dev), 0c343c4c8 (6.7), e68edd6a0 (dev), 2f3902723 (dev), b4c588793 (dev), d2dbe2d7f (dev), fa5cb8406 (dev), b13131027 (6.7), 7bff20c9f (dev), d2436f729 (dev), 88b5b1bce (dev), ad755020e (dev), 8ab63278e (dev)
-
Foundation Sprint 103, Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106
Description
The review of dfaure_kdab's race condition fix¹ reminded me that QSignalSpy is on the blockers for adding -Wweak-vtable (², QTBUG-45582). In fact, the whole class can and should be de-inlined, and if we'd manage to make the args and sig members const, we'd be able to move the mutex lock out of initArgs() and, in appendArgs(), move it lower, covering just the QList::append() there, which, incidentally, should use the rvalue append() overload. The template ctor could use a dose of DRY/SCARY.
We could also think about removing the QObject inheritance (and use a private QObject for that), or at least make the inheritance private. There's really no reason for users of the class to treat it as a QObject.
Acceptance criteria:
- Use topic:QSignalSpy
- QSignalSpy is completely de-inlined into a new .cpp file
- incl. newly-added dtor
- except trivial functions like isValid() or signature().
- template ctor is SCARY
- args and sig members are const
- mutex use is limited to absolutely necessary
- the QVariantList in appendArgs() is moved into *this
References:
Attachments
Issue Links
- resulted in
-
QTBUG-129452 QSignalSpy no longer inherits QObject - Documentation
-
- Closed
-