src/dbus/qdbuspendingcall_p.h
changeset 30 5dc02b23752f
parent 29 b72c6db6890b
child 33 3e2da88830cd
--- a/src/dbus/qdbuspendingcall_p.h	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/dbus/qdbuspendingcall_p.h	Tue Jul 06 15:10:48 2010 +0300
@@ -57,12 +57,12 @@
 #include <qshareddata.h>
 #include <qpointer.h>
 #include <qlist.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
 
 #include "qdbusmessage.h"
 #include "qdbus_symbols_p.h"
 
+#ifndef QT_NO_DBUS
+
 QT_BEGIN_NAMESPACE
 
 class QDBusPendingCall;
@@ -73,35 +73,24 @@
 class QDBusPendingCallPrivate: public QSharedData
 {
 public:
-    // {
-    //     set only during construction:
-    const QDBusMessage sentMessage;
-    QDBusConnectionPrivate * const connection;
+    QDBusMessage sentMessage;
+    QDBusMessage replyMessage;
+//    QDBusMessage pendingReplyMessage; // used in the local loop
+    QDBusPendingCallWatcherHelper *watcherHelper;
+    DBusPendingCall *pending;
+    QDBusConnectionPrivate *connection;
 
-    // for the callback mechanism (see setReplyCallback and QDBusConnectionPrivate::sendWithReplyAsync)
+    QString expectedReplySignature;
+    int expectedReplyCount;
+
+    // for the callback
     QPointer<QObject> receiver;
     QList<int> metaTypes;
     int methodIdx;
 
     bool autoDelete;
-    // }
 
-    mutable QMutex mutex;
-    QWaitCondition waitForFinishedCondition;
-
-    // {
-    //    protected by the mutex above:
-    QDBusPendingCallWatcherHelper *watcherHelper;
-    QDBusMessage replyMessage;
-    DBusPendingCall *pending;
-    volatile bool waitingForFinished;
-
-    QString expectedReplySignature;
-    int expectedReplyCount;
-    // }
-
-    QDBusPendingCallPrivate(const QDBusMessage &sent, QDBusConnectionPrivate *connection)
-        : sentMessage(sent), connection(connection), autoDelete(false), watcherHelper(0), pending(0), waitingForFinished(false)
+    QDBusPendingCallPrivate() : watcherHelper(0), pending(0), autoDelete(false)
     { }
     ~QDBusPendingCallPrivate();
     bool setReplyCallback(QObject *target, const char *member);
@@ -135,4 +124,5 @@
 
 QT_END_NAMESPACE
 
+#endif // QT_NO_DBUS
 #endif