[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:21 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=8814501
The following commit has been merged in the master branch:
commit 881450146f123aa6981f2dbd5448733dfe0b5aa9
Author: Samoilenko Yuri <kinnalru at gmail.com>
Date: Thu Jan 30 20:39:11 2014 +0400
wow - almost work, but some tricks...
---
.../kdeconnectdeclarativeplugin.cpp | 4 +-
plasmoid/declarativeplugin/responsewaiter.cpp | 1 +
plasmoid/package/contents/ui/DeviceDelegate.qml | 51 ++++++++++------------
3 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
index 4038c9e..366d322 100644
--- a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
+++ b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
@@ -40,11 +40,10 @@ QObject* createSftpInterface(QVariant deviceId)
return new SftpDbusInterface(deviceId.toString());
}
-QDeclarativeEngine* engine_;
QObject* createDBusResponse()
{
- return new DBusResponse(engine_);
+ return new DBusResponse();
}
void KdeConnectDeclarativePlugin::registerTypes(const char* uri)
@@ -60,7 +59,6 @@ void KdeConnectDeclarativePlugin::registerTypes(const char* uri)
void KdeConnectDeclarativePlugin::initializeEngine(QDeclarativeEngine* engine, const char* uri)
{
- engine_ = engine;
QDeclarativeExtensionPlugin::initializeEngine(engine, uri);
engine->rootContext()->setContextProperty("SftpDbusInterfaceFactory"
diff --git a/plasmoid/declarativeplugin/responsewaiter.cpp b/plasmoid/declarativeplugin/responsewaiter.cpp
index 9c2af1a..2a817c4 100644
--- a/plasmoid/declarativeplugin/responsewaiter.cpp
+++ b/plasmoid/declarativeplugin/responsewaiter.cpp
@@ -78,6 +78,7 @@ void DBusResponse::onCallFinished(QDBusPendingCallWatcher* watcher)
}
}
}
+ deleteLater();
}
const QDBusPendingCall* DBusResponseWaiter::extractPendingCall(QVariant& variant) const
diff --git a/plasmoid/package/contents/ui/DeviceDelegate.qml b/plasmoid/package/contents/ui/DeviceDelegate.qml
index 6099f1e..cf5207c 100644
--- a/plasmoid/package/contents/ui/DeviceDelegate.qml
+++ b/plasmoid/package/contents/ui/DeviceDelegate.qml
@@ -30,20 +30,23 @@ PlasmaComponents.ListItem
property variant sftp: SftpDbusInterfaceFactory.create(deviceId)
- DBusResponse
- {
- id: resp
- onSuccess: {
- console.log(1)
- if (result)
- {
- browse.state = "MOUNTED"
+ Component.onCompleted: {
+ var response = DBusResponseFactory.create()
+ response.success.connect( function(result) {
+ if (result) {
+ state = "MOUNTED"
}
- }
- onError: function(message) {
- console.debug("error:" + message)
- }
- pendingCall: sftp.isMounted()
+ else {
+ state = "UNMOUNTED"
+ }
+ })
+
+ response.error.connect( function(message) {
+ console.error("Error:" + message)
+ state = "UNMOUNTED"
+ })
+
+ response.pendingCall = sftp.isMounted()
}
Column {
@@ -62,13 +65,11 @@ PlasmaComponents.ListItem
text: "Browse"
state: "UNMOUNTED"
- function mounted() {
- console.debug("SUCCESS")
- }
onClicked: {
if (state == "UNMOUNTED") {
state = "MOUNTING"
- resp.success.connect(function(result){
+ var response = DBusResponseFactory.create()
+ response.success.connect( function(result){
if (result) {
state = "MOUNTED"
}
@@ -77,18 +78,12 @@ PlasmaComponents.ListItem
}
})
- resp.error.connect(function(){
- console.debug("ERROR")
+ response.error.connect( function(message) {
+ console.error("Error:" + message)
+ state = "UNMOUNTED"
})
- resp.pendingCall = sftp.startBrowsing()
-// if (ResponseWaiter.waitForReply(sftp.startBrowsing()))
-// {
-// state = "MOUNTED"
-// }
-// else
-// {
-// state = "UNMOUNTED"
-// }
+
+ response.pendingCall = sftp.startBrowsing()
}
else {
sftp.umount()
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list