[SCM] kdeconnect packaging branch, master, updated. upstream/1.0.1-206-gf661872

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 18:27:11 UTC 2017


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

The following commit has been merged in the master branch:
commit 1a2b227dffdeb99865ee02bfdc6a5f057913ff82
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Sat Nov 26 15:55:18 2016 +0100

    Q_GLOBAL_STATIC is unnecessary on basic data types.
---
 core/daemon.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/daemon.cpp b/core/daemon.cpp
index 2dcaece..07a718b 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -34,7 +34,7 @@
 #include "backends/devicelink.h"
 #include "backends/linkprovider.h"
 
-Q_GLOBAL_STATIC(Daemon*, s_instance)
+static Daemon* s_instance = nullptr;
 
 struct DaemonPrivate
 {
@@ -49,16 +49,16 @@ struct DaemonPrivate
 
 Daemon* Daemon::instance()
 {
-    Q_ASSERT(s_instance.exists());
-    return *s_instance;
+    Q_ASSERT(s_instance != nullptr);
+    return s_instance;
 }
 
 Daemon::Daemon(QObject *parent, bool testMode)
     : QObject(parent)
     , d(new DaemonPrivate)
 {
-    Q_ASSERT(!s_instance.exists());
-    *s_instance = this;
+    Q_ASSERT(!s_instance);
+    s_instance = this;
     qCDebug(KDECONNECT_CORE) << "KdeConnect daemon starting";
 
     //Load backends

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list