[Telepathy-commits] [telepathy-qt4/master] PendingOperation: don't watch for deletion of parent, just warn in destructor if we're not finished yet
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Dec 3 07:20:48 PST 2008
---
TelepathyQt4/cli-pending-operation.cpp | 16 ++++++----------
TelepathyQt4/cli-pending-operation.h | 1 -
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/TelepathyQt4/cli-pending-operation.cpp b/TelepathyQt4/cli-pending-operation.cpp
index 94f5e4c..e780664 100644
--- a/TelepathyQt4/cli-pending-operation.cpp
+++ b/TelepathyQt4/cli-pending-operation.cpp
@@ -60,6 +60,12 @@ PendingOperation::PendingOperation(QObject* parent)
PendingOperation::~PendingOperation()
{
+ if (!mPriv->finished) {
+ qWarning() << this
+ << "still pending when it was deleted - finished will "
+ "never be emitted";
+ }
+
delete mPriv;
}
@@ -155,16 +161,6 @@ QString PendingOperation::errorMessage() const
}
-void PendingOperation::parentDestroyed(QObject* parent)
-{
- if (!mPriv->finished) {
- qWarning() << parent
- << "still pending when its parent was deleted - finished will "
- "never be emitted";
- }
-}
-
-
PendingVoidMethodCall::PendingVoidMethodCall(QObject* proxy,
QDBusPendingCall call)
: PendingOperation(proxy),
diff --git a/TelepathyQt4/cli-pending-operation.h b/TelepathyQt4/cli-pending-operation.h
index 6c70aa7..ec7d649 100644
--- a/TelepathyQt4/cli-pending-operation.h
+++ b/TelepathyQt4/cli-pending-operation.h
@@ -162,7 +162,6 @@ protected:
void setFinishedWithError(const QDBusError& error);
private Q_SLOTS:
- void parentDestroyed(QObject* parent);
void emitFinished();
private:
--
1.5.6.5
More information about the Telepathy-commits
mailing list