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

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:45 UTC 2016


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

The following commit has been merged in the master branch:
commit 415412e15d6f22cbbc33193383a5b5b398c58158
Author: Martin Gräßlin <mgraesslin at kde.org>
Date:   Fri Jul 3 07:45:43 2015 +0200

    [mousepad] Split X11 implementation into dedicated method
---
 plugins/mousepad/mousepadplugin.cpp | 12 ++++++++----
 plugins/mousepad/mousepadplugin.h   |  4 +++-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/plugins/mousepad/mousepadplugin.cpp b/plugins/mousepad/mousepadplugin.cpp
index 3d69959..38b7c8e 100644
--- a/plugins/mousepad/mousepadplugin.cpp
+++ b/plugins/mousepad/mousepadplugin.cpp
@@ -92,6 +92,14 @@ MousepadPlugin::~MousepadPlugin()
 
 bool MousepadPlugin::receivePackage(const NetworkPackage& np)
 {
+    if (m_x11) {
+        return handlePackageX11(np);
+    }
+    return false;
+}
+
+bool MousepadPlugin::handlePackageX11(const NetworkPackage &np)
+{
     //qDebug() << np.serialize();
 
     //TODO: Split mouse/keyboard in two different plugins to avoid this big if statement
@@ -110,10 +118,6 @@ bool MousepadPlugin::receivePackage(const NetworkPackage& np)
     int specialKey = np.get<int>("specialKey", 0);
 
     if (isSingleClick || isDoubleClick || isMiddleClick || isRightClick || isSingleHold || isScroll || !key.isEmpty() || specialKey) {
-
-        if (!m_x11) {
-            return false;
-        }
         Display *display = QX11Info::display();
         if(!display) {
             return false;
diff --git a/plugins/mousepad/mousepadplugin.h b/plugins/mousepad/mousepadplugin.h
index b1ebcaa..4bef0db 100644
--- a/plugins/mousepad/mousepadplugin.h
+++ b/plugins/mousepad/mousepadplugin.h
@@ -41,8 +41,10 @@ public:
     virtual void connected() { }
 
 private:
+    bool handlePackageX11(const NetworkPackage& np);
+
     FakeKey* m_fakekey;
-    bool m_x11;
+    const bool m_x11;
 
 };
 

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list