00001 #ifndef SAFEDBUSPENDINGCALLWATCHER_H
00002 #define SAFEDBUSPENDINGCALLWATCHER_H
00003
00004 #include "sconnect.h"
00005 #include <QDBusPendingCallWatcher>
00006
00009 class SafeDBusPendingCallWatcher : public QDBusPendingCallWatcher
00010 {
00011 Q_OBJECT;
00012
00013 public:
00014 SafeDBusPendingCallWatcher(const QDBusPendingCall &call, QObject * parent = 0) :
00015 QDBusPendingCallWatcher(call, parent)
00016 {
00017 sconnect(this, SIGNAL(finished(QDBusPendingCallWatcher *)),
00018 this, SLOT(deleteLater()));
00019 }
00020 };
00021 #endif