summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-04-03 10:36:32 -0300
committerQt by Nokia <qt-info@nokia.com>2012-05-04 12:44:14 +0200
commit2376a5c4e0ea930d43d9377f4e93738a20659097 (patch)
tree4d9484bcda301d82619b801386b7ff52f39dc08c /tests
parentb45f0418e34a73da1729376c540b312b14b8ffda (diff)
Make the event notification on Windows be mandatory in all dispatchers
This way, QWinEventNotifier will work on all Windows systems, not just with the default event dispatcher. Other dispatchers (other than QWin32EventDispatcher) are permitted, so the class should not abort just because of that. If a dispatcher really doesn't want to implement this, they need to implement the virtuals to do nothing, possibly print a warning. Change-Id: I2c132bcde95b9d5941c8906a0fcd2ad964087772 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp5
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp5
-rw-r--r--tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp5
-rw-r--r--tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp5
4 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
index e8f6c29a94..2ac075bebf 100644
--- a/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
+++ b/tests/auto/corelib/kernel/qcoreapplication/tst_qcoreapplication.cpp
@@ -622,6 +622,11 @@ public:
void interrupt() {}
void flush() {}
+#ifdef Q_OS_WIN
+ bool registerEventNotifier(QWinEventNotifier *) { return false; }
+ void unregisterEventNotifier(QWinEventNotifier *) { }
+#endif
+
bool visited;
};
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 41cfc52354..da49f43b7d 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1239,6 +1239,11 @@ public:
void interrupt() {}
void flush() {}
+#ifdef Q_OS_WIN
+ bool registerEventNotifier(QWinEventNotifier *) { return false; }
+ void unregisterEventNotifier(QWinEventNotifier *) { }
+#endif
+
bool visited;
};
diff --git a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
index 82de653586..b077291cc6 100644
--- a/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
+++ b/tests/auto/testlib/selftests/benchlibeventcounter/tst_benchlibeventcounter.cpp
@@ -64,6 +64,11 @@ public:
bool unregisterTimers(QObject*) { return false; }
int remainingTime(int) { return 0; }
void wakeUp() {}
+
+#ifdef Q_OS_WIN
+ bool registerEventNotifier(QWinEventNotifier *) { return false; }
+ void unregisterEventNotifier(QWinEventNotifier *) { }
+#endif
};
class tst_BenchlibEventCounter: public QObject
diff --git a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
index d3be93b715..7673aa396e 100644
--- a/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
+++ b/tests/auto/testlib/selftests/benchliboptions/tst_benchliboptions.cpp
@@ -64,6 +64,11 @@ public:
bool unregisterTimers(QObject*) { return false; }
int remainingTime(int) { return 0; }
void wakeUp() {}
+
+#ifdef Q_OS_WIN
+ bool registerEventNotifier(QWinEventNotifier *) { return false; }
+ void unregisterEventNotifier(QWinEventNotifier *) { }
+#endif
};
class tst_BenchlibOptions: public QObject