[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:27:54 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=994057a

The following commit has been merged in the master branch:
commit 994057af0e4c54f5546a7872312e403e0707ff15
Author: Lukáš Tinkl <lukas at kde.org>
Date:   Tue Sep 9 17:54:16 2014 +0200

    fix the Configure action
    
    display the kdeconnect kcm
---
 interfaces/notificationsmodel.cpp                  |  6 ++--
 plasmoid/declarativeplugin/CMakeLists.txt          |  1 +
 .../kdeconnectdeclarativeplugin.cpp                |  2 ++
 .../kdeconnectdeclarativeplugin.h                  | 10 ++----
 plasmoid/declarativeplugin/processrunner.cpp       | 35 +++++++++++++++++++++
 plasmoid/declarativeplugin/processrunner.h         | 36 ++++++++++++++++++++++
 plasmoid/package/contents/ui/main.qml              | 14 +++++++++
 .../notifications/notificationsdbusinterface.cpp   |  2 --
 8 files changed, 94 insertions(+), 12 deletions(-)

diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp
index 7ff1638..088165b 100644
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@ -159,13 +159,13 @@ QVariant NotificationsModel::data(const QModelIndex& index, int role) const
         case IconModelRole:
             return KIcon("device-notifier").pixmap(32, 32);
         case IdModelRole:
-            return QString(notification->internalId());
+            return notification->internalId();
         case NameModelRole:
-            return QString(notification->ticker());
+            return notification->ticker();
         case ContentModelRole:
             return QString(); //To implement in the Android side
         case AppNameModelRole:
-            return QString(notification->appName());
+            return notification->appName();
         case DbusInterfaceRole:
             return qVariantFromValue<QObject*>(notification);
         case DismissableModelRole:
diff --git a/plasmoid/declarativeplugin/CMakeLists.txt b/plasmoid/declarativeplugin/CMakeLists.txt
index 4b85792..b483e79 100644
--- a/plasmoid/declarativeplugin/CMakeLists.txt
+++ b/plasmoid/declarativeplugin/CMakeLists.txt
@@ -6,6 +6,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
 set(kdeconnectdeclarativeplugin_SRC
     kdeconnectdeclarativeplugin.cpp
     responsewaiter.cpp
+    processrunner.cpp
 )
 
 set(kdeconnectdeclarativeplugin_MOC
diff --git a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
index 9ea7f16..5b9716f 100644
--- a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
+++ b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.cpp
@@ -28,6 +28,7 @@
 
 #include "objectfactory.h"
 #include "responsewaiter.h"
+#include "processrunner.h"
 
 #include "interfaces/devicesmodel.h"
 #include "interfaces/notificationsmodel.h"
@@ -59,6 +60,7 @@ void KdeConnectDeclarativePlugin::registerTypes(const char* uri)
     qmlRegisterType<DevicesModel>("org.kde.kdeconnect", 1, 0, "DevicesModel");
     qmlRegisterType<NotificationsModel>("org.kde.kdeconnect", 1, 0, "NotificationsModel");
     qmlRegisterType<DBusAsyncResponse>("org.kde.kdeconnect", 1, 0, "DBusAsyncResponse");
+    qmlRegisterType<ProcessRunner>(uri, 1, 0, "ProcessRunner");
 }
 
 void KdeConnectDeclarativePlugin::initializeEngine(QQmlEngine* engine, const char* uri)
diff --git a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h
index 8c9ecd2..85d0cf0 100644
--- a/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h
+++ b/plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h
@@ -18,8 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef ANALITZADECLARATIVEPLUGIN_H
-#define ANALITZADECLARATIVEPLUGIN_H
+#ifndef KDECONNECTDECLARATIVEPLUGIN_H
+#define KDECONNECTDECLARATIVEPLUGIN_H
 
 #include <QQmlExtensionPlugin>
 
@@ -33,8 +33,4 @@ class KdeConnectDeclarativePlugin : public QQmlExtensionPlugin
     virtual void initializeEngine(QQmlEngine *engine, const char *uri);
 };
 
-
-
-
-
-#endif // ANALITZADECLARATIVEPLUGIN_H
+#endif // KDECONNECTDECLARATIVEPLUGIN_H
diff --git a/plasmoid/declarativeplugin/processrunner.cpp b/plasmoid/declarativeplugin/processrunner.cpp
new file mode 100644
index 0000000..aa57aaf
--- /dev/null
+++ b/plasmoid/declarativeplugin/processrunner.cpp
@@ -0,0 +1,35 @@
+/***************************************************************************
+ *   Copyright (C) 2013 by Eike Hein <hein at kde.org>                        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#include "processrunner.h"
+
+#include <QProcess>
+
+ProcessRunner::ProcessRunner(QObject *parent) : QObject(parent)
+{
+}
+
+ProcessRunner::~ProcessRunner()
+{
+}
+
+void ProcessRunner::runKdeconnectKCM()
+{
+    QProcess::startDetached("kcmshell5", QStringList() << "kcm_kdeconnect");
+}
diff --git a/plasmoid/declarativeplugin/processrunner.h b/plasmoid/declarativeplugin/processrunner.h
new file mode 100644
index 0000000..20e86e6
--- /dev/null
+++ b/plasmoid/declarativeplugin/processrunner.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ *   Copyright (C) 2013 by Eike Hein <hein at kde.org>                        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
+ ***************************************************************************/
+
+#ifndef PROCESSRUNNER_H
+#define PROCESSRUNNER_H
+
+#include <QObject>
+
+class ProcessRunner : public QObject
+{
+    Q_OBJECT
+
+public:
+    ProcessRunner(QObject *parent = 0);
+    ~ProcessRunner();
+
+    Q_INVOKABLE void runKdeconnectKCM();
+};
+
+#endif
diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml
index 28b5849..71e66b1 100644
--- a/plasmoid/package/contents/ui/main.qml
+++ b/plasmoid/package/contents/ui/main.qml
@@ -21,6 +21,7 @@
 import QtQuick 2.1
 import org.kde.plasma.core 2.0 as PlasmaCore
 import org.kde.plasma.plasmoid 2.0
+import org.kde.kdeconnect 1.0
 
 Item
 {
@@ -35,4 +36,17 @@ Item
     Plasmoid.fullRepresentation: FullRepresentation {}
 
     Plasmoid.preferredRepresentation: isConstrained() ? Plasmoid.compactRepresentation : Plasmoid.fullRepresentation
+
+    ProcessRunner {
+        id: processRunner
+    }
+
+    function action_launchkcm() {
+        processRunner.runKdeconnectKCM();
+    }
+
+    Component.onCompleted: {
+        plasmoid.removeAction("configure");
+        plasmoid.setAction("launchkcm", i18n("KDE Connect Settings..."), "configure");
+    }
 }
diff --git a/plugins/notifications/notificationsdbusinterface.cpp b/plugins/notifications/notificationsdbusinterface.cpp
index ba57925..5d32f7c 100644
--- a/plugins/notifications/notificationsdbusinterface.cpp
+++ b/plugins/notifications/notificationsdbusinterface.cpp
@@ -85,7 +85,6 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np)
         }
 
         addNotification(noti);
-
     }
 }
 
@@ -106,7 +105,6 @@ void NotificationsDbusInterface::addNotification(Notification* noti)
 
     QDBusConnection::sessionBus().registerObject(mDevice->dbusPath()+"/notifications/"+publicId, noti, QDBusConnection::ExportScriptableContents);
     Q_EMIT notificationPosted(publicId);
-
 }
 
 void NotificationsDbusInterface::removeNotification(const QString& internalId)

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list