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

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:26:39 UTC 2016


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

The following commit has been merged in the master branch:
commit fa3e0145adcfd570fbb768d9e6d69b0fec4b6df3
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Thu Jul 4 14:31:47 2013 +0200

    Package version checks
---
 daemon/networkpackage.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/daemon/networkpackage.cpp b/daemon/networkpackage.cpp
index 379fc9b..82b7d54 100644
--- a/daemon/networkpackage.cpp
+++ b/daemon/networkpackage.cpp
@@ -29,11 +29,13 @@
 #include <ctime>
 #include <qjson/qobjecthelper.h>
 
+const static int CURRENT_PACKAGE_VERSION = 1;
+
 NetworkPackage::NetworkPackage(QString type)
 {
     mId = time(NULL);
     mType = type;
-    mVersion = 1;
+    mVersion = CURRENT_PACKAGE_VERSION;
 }
 
 QByteArray NetworkPackage::serialize() const
@@ -65,6 +67,11 @@ void NetworkPackage::unserialize(QByteArray a, NetworkPackage* np)
         np->setVersion(-1);
     }
 
+    if (np->version() > CURRENT_PACKAGE_VERSION) {
+        qDebug() << "Warning: package version " << np->version() << " greater than supported version " << CURRENT_PACKAGE_VERSION;
+    }
+
+
     //QVariant -> Object
     //NetworkPackage np;
     //QJSon json(a);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list