qt5base-lts/tests
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
..
auto QSignalBlocker: (new) RAII class for QObject::blockSignals() 2013-10-30 12:56:44 +01:00
baselineserver WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
benchmarks Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
global tst_bic: Add linux-gcc-ia32 bic data for QtXml 2013-01-16 08:25:28 +01:00
manual Add widget replace function to QLayout 2013-09-21 23:17:55 +02:00
shared WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
README Doc: Fix references to Qt Test 2013-01-30 01:35:06 +01:00
tests.pro Properly implement a 'make docs' target for subdirs and apps/libs 2012-05-09 08:34:42 +02:00

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.