qt5base-lts/tests/auto
Alex Trotsenko cdbd68fc2f Allow QWinEventNotifier to coexist with waiting functions
Many subclasses of QIODevice have a functionality to block execution
until some asynchronous I/O operation completes. In case we are using
QWinEventNotifier, a typical reimplemented waitFor{ReadyRead
|BytesWritten}() function could look like:

  if (WaitForSingleObject(notifier.handle(),...) == WAIT_OBJECT_0) {
      notifier.setEnabled(false);
      ResetEvent(notifier.handle());

      bool res = GetOverlappedResult(...);
      ...
      return true;
  }

Despite the fact that the operation ends synchronously, it leaves the
notifier in a state that indicates it has received the event, so its
next call to setEnabled(true) will produce a fake notification.

So, we should reset a notifier's history before enabling it again.

Change-Id: I62a9dd809ce6a7a40e9d8038f2a49299b36f8142
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-27 15:08:46 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for QtBase for 5.10 2018-01-04 16:26:32 +00:00
cmake CMake: Set SKIP_AUTOMOC/AUTOUIC where needed 2017-11-22 13:51:30 +00:00
compilerwarnings/data Updated license headers 2016-01-21 18:55:18 +00:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Allow QWinEventNotifier to coexist with waiting functions 2018-03-27 15:08:46 +00:00
dbus Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
gui Merge remote-tracking branch 'origin/5.11' into dev 2018-03-21 08:59:26 +01:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network QNetworkReply: fix isFinished() for disabled replies 2018-03-17 08:38:29 +00:00
opengl Remove tst_QGLThreads::textureUploadInThread 2018-03-02 07:20:32 +00:00
other Merge remote-tracking branch 'origin/5.11' into dev 2018-03-21 08:59:26 +01:00
printsupport Fix tst_QAbstractPrintDialog::setMinMax 2018-03-19 10:21:14 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql MySQL: Fix tests 2018-03-17 23:14:34 +00:00
testlib Merge remote-tracking branch 'origin/5.11' into dev 2018-03-18 01:00:11 +01:00
tools uic: Add the include for QIcon conditionally 2018-03-06 06:49:00 +00:00
widgets Allow adaptive decimal stepping for QSpinBox and QDoubleSpinBox 2018-03-22 21:37:45 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro tests/auto/auto.pro: Use correct null device for DBUS check 2017-12-01 09:53:07 +00:00
network-settings.h Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00