qt5base-lts/tests/auto/corelib/kernel
Marc Mutz ed827acc27 QSignalBlocker: (new) RAII class for QObject::blockSignals()
I don't think I ever worked on a project of non-trivial
size that didn't at some point add a QSignalBlocker.

This commit adds code, tests and documentation. Later
commits will convert naked blockSignals() calls to use
QSignalBlocker.

The implementation is purely inline to avoid the heavy
overhead of cross-dll function calls for this miniscule
task. This should not be a problem because QSignalBlocker
only uses public API and a pattern that we anyway need
to keep working until Qt 6, at least, so even changing
the implementation later will be no problem as the old
implementation lurking in non-recompiled code will be
acceptable, too.

This implementation is an evolution from KDTools'
KDSignalBlocker, with the following changes:
- Implements unblock() and reblock()
- Uses the return value of blockSignals() instead of a
  separate signalsBlocked() call.

Change-Id: I1933dfd72a0f5190324be377cfca3c54cf3d6828
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-10-30 12:56:44 +01:00
..
qcoreapplication Base tst_QGuiApplication on tst_QCoreApplication to increase GUI ED coverage 2013-10-01 18:00:17 +02:00
qeventdispatcher Don't send posted events from QWindowSystemInterface::sendWindowSystemEvents 2013-09-16 15:22:40 +02:00
qeventloop WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qmath Fix qmath autotest for arm 2013-03-14 19:49:38 +01:00
qmetamethod QMetaMethod and QDBusMetaObject: Give public access to signal methods 2013-09-09 16:21:10 +02:00
qmetaobject rewrite qtMetaObjectInheritance() without gui 2013-10-11 21:03:39 +02:00
qmetaobjectbuilder don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
qmetaproperty Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qmetatype WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qmimedata tests: Fix some more old references and links to Nokia 2013-02-01 15:27:37 +01:00
qobject QSignalBlocker: (new) RAII class for QObject::blockSignals() 2013-10-30 12:56:44 +01:00
qpointer don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
qsharedmemory Skip unstable autotest 2013-03-12 18:13:37 +01:00
qsignalmapper don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
qsocketnotifier Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qsystemsemaphore Check existence of QProcess feature before using it on Qt autotests. 2013-01-28 16:06:15 +01:00
qtimer Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qtranslator tst_qtranslator: Remove QT_DISABLE_DEPRECATED_BEFORE=0 2013-04-12 07:20:05 +02:00
qvariant Revert 15da0a5af2. 2013-09-19 14:58:27 +02:00
qwineventnotifier Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
kernel.pro Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00