[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:22 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=499b8b0
The following commit has been merged in the master branch:
commit 499b8b00b7b08f5def1f62e2db5afb58e727ba88
Author: Samoilenko Yuri <kinnalru at gmail.com>
Date: Thu Feb 6 00:36:51 2014 +0400
some fixes
---
plasmoid/declarativeplugin/responsewaiter.cpp | 15 ++++++++++-----
plasmoid/declarativeplugin/responsewaiter.h | 9 +++++++--
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/plasmoid/declarativeplugin/responsewaiter.cpp b/plasmoid/declarativeplugin/responsewaiter.cpp
index b8327a9..725e8de 100644
--- a/plasmoid/declarativeplugin/responsewaiter.cpp
+++ b/plasmoid/declarativeplugin/responsewaiter.cpp
@@ -3,9 +3,6 @@
#include <QDBusPendingReply>
#include <QDebug>
#include <QCoreApplication>
-#include <qdeclarativeexpression.h>
-#include <QDeclarativeEngine>
-#include <QDeclarativeContext>
#include "responsewaiter.h"
@@ -43,6 +40,12 @@ QVariant DBusResponseWaiter::waitForReply(QVariant variant) const
if (QDBusPendingCall* call = const_cast<QDBusPendingCall*>(extractPendingCall(variant)))
{
call->waitForFinished();
+
+ if (call->isError())
+ {
+ return QVariant("error");
+ }
+
QDBusMessage reply = call->reply();
if (reply.arguments().count() > 0)
@@ -64,7 +67,6 @@ void DBusAsyncResponse::setPendingCall(QVariant variant)
};
}
-
void DBusAsyncResponse::onCallFinished(QDBusPendingCallWatcher* watcher)
{
QVariant variant = watcher->property("pengingCall");
@@ -89,7 +91,10 @@ void DBusAsyncResponse::onCallFinished(QDBusPendingCallWatcher* watcher)
}
}
}
- deleteLater();
+ if (m_autodelete)
+ {
+ deleteLater();
+ }
}
const QDBusPendingCall* DBusResponseWaiter::extractPendingCall(QVariant& variant) const
diff --git a/plasmoid/declarativeplugin/responsewaiter.h b/plasmoid/declarativeplugin/responsewaiter.h
index ea57370..aaeb9fe 100644
--- a/plasmoid/declarativeplugin/responsewaiter.h
+++ b/plasmoid/declarativeplugin/responsewaiter.h
@@ -37,12 +37,14 @@ class DBusAsyncResponse : public QObject
Q_OBJECT
Q_PROPERTY(QVariant pendingCall WRITE setPendingCall)
+ Q_PROPERTY(bool autoDelete WRITE setAutodelete)
public:
- DBusAsyncResponse(QObject* parent = 0) : QObject(parent) {}
- virtual ~DBusAsyncResponse() {};
+ DBusAsyncResponse(QObject* parent = 0) : QObject(parent), m_autodelete(false) {}
+ virtual ~DBusAsyncResponse() {};
void setPendingCall(QVariant e);
+ void setAutodelete(bool b) {m_autodelete = b;};
Q_SIGNALS:
void success(QVariant result);
@@ -50,6 +52,9 @@ Q_SIGNALS:
private Q_SLOTS:
void onCallFinished(QDBusPendingCallWatcher* watcher);
+
+private:
+ bool m_autodelete;
};
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list