summaryrefslogtreecommitdiff
path: root/ACE/ace/QtReactor
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-04-18 09:29:41 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-04-18 09:29:41 +0000
commit22625d52f34d8a8eca7ca5d734944fa11757b154 (patch)
tree2154666248faeff7fa80617d156f55472caec88d /ACE/ace/QtReactor
parent5e060e7b00be8f036d43511a681ac8dc55e2b315 (diff)
downloadATCD-22625d52f34d8a8eca7ca5d734944fa11757b154.tar.gz
Wed Apr 18 09:29:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/QtReactor')
-rw-r--r--ACE/ace/QtReactor/QtReactor.cpp11
-rw-r--r--ACE/ace/QtReactor/QtReactor.h9
2 files changed, 19 insertions, 1 deletions
diff --git a/ACE/ace/QtReactor/QtReactor.cpp b/ACE/ace/QtReactor/QtReactor.cpp
index 28682e17109..5a80886174b 100644
--- a/ACE/ace/QtReactor/QtReactor.cpp
+++ b/ACE/ace/QtReactor/QtReactor.cpp
@@ -495,7 +495,12 @@ ACE_QtReactor::reset_timeout (void)
this,
SLOT (timeout_event ()));
+#if QT_VERSION >= 0x040000
+ qtime_->setSingleShot (1);
+ qtime_->start(max_wait_time->msec());
+#else
qtime_->start(max_wait_time->msec(), 1);
+#endif
}
}
@@ -565,7 +570,7 @@ ACE_QtReactor::QtWaitForMultipleEvents (int width,
ACE_Select_Reactor_Handle_Set &wait_set,
ACE_Time_Value * /*max_wait_time*/)
{
- // Keep a copy of the wait set in case the wait_set be changed
+ // Keep a copy of the wait set in case the wait_set be changed
// between the two select calls in this function. It could happen
// while waiting for an event, another event is handled and dispatched
// which changes the dispatch_set_/wait_set.
@@ -582,7 +587,11 @@ ACE_QtReactor::QtWaitForMultipleEvents (int width,
return -1; // Bad file arguments...
// Qt processing.
+#if QT_VERSION >= 0x040000
+ this->qapp_->processEvents();
+#else
this->qapp_->processOneEvent ();
+#endif
// Reset the width, in case it changed during the upcalls.
width = handler_rep_.max_handlep1 ();
diff --git a/ACE/ace/QtReactor/QtReactor.h b/ACE/ace/QtReactor/QtReactor.h
index 33e50058c15..14e1b183688 100644
--- a/ACE/ace/QtReactor/QtReactor.h
+++ b/ACE/ace/QtReactor/QtReactor.h
@@ -25,11 +25,20 @@
#include "ace/Select_Reactor.h"
#include "ace/Map_Manager.h"
+#include "qglobal.h"
+
// QT toolkit specific includes.
+#if QT_VERSION >= 0x040000
+#include /**/ <QtGui/QApplication>
+#include /**/ <QtCore/QObject>
+#include /**/ <QtCore/QSocketNotifier.h>
+#include /**/ <QtCore/QTimer.h>
+#else
#include /**/ <qapplication.h>
#include /**/ <qobject.h>
#include /**/ <qsocketnotifier.h>
#include /**/ <qtimer.h>
+#endif
ACE_BEGIN_VERSIONED_NAMESPACE_DECL