[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:08 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=2c2cb21
The following commit has been merged in the master branch:
commit 2c2cb21ee1b478ee87839c80ad53b0d15d2df830
Author: Aleix Pol <aleixpol at kde.org>
Date: Sat Sep 12 20:53:05 2015 +0200
Don't clean the devices that looked us up in the first place
---
core/daemon.cpp | 2 +-
core/device.cpp | 12 ++++++++++++
core/device.h | 3 +++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/core/daemon.cpp b/core/daemon.cpp
index 04218be..2c5c1ec 100644
--- a/core/daemon.cpp
+++ b/core/daemon.cpp
@@ -123,7 +123,7 @@ void Daemon::removeDevice(Device* device)
void Daemon::cleanDevices()
{
Q_FOREACH(Device* device, d->mDevices) {
- if (!device->isPaired()) {
+ if (!device->isPaired() && device->connectionSource() == DeviceLink::ConnectionStarted::Remotely) {
removeDevice(device);
}
}
diff --git a/core/device.cpp b/core/device.cpp
index 46df8bd..75bbcde 100644
--- a/core/device.cpp
+++ b/core/device.cpp
@@ -489,6 +489,18 @@ void Device::setAsPaired()
}
+DeviceLink::ConnectionStarted Device::connectionSource() const
+{
+ DeviceLink::ConnectionStarted ret = DeviceLink::Remotely;
+ Q_FOREACH(DeviceLink* link, m_deviceLinks) {
+ if(link->connectionSource() == DeviceLink::ConnectionStarted::Locally) {
+ ret = DeviceLink::ConnectionStarted::Locally;
+ break;
+ }
+ }
+ return ret;
+}
+
QStringList Device::availableLinks() const
{
QStringList sl;
diff --git a/core/device.h b/core/device.h
index fbffb99..908333a 100644
--- a/core/device.h
+++ b/core/device.h
@@ -30,6 +30,7 @@
#include <QtCrypto>
#include "networkpackage.h"
+#include "backends/devicelink.h"
class DeviceLink;
class KdeConnectPlugin;
@@ -108,6 +109,8 @@ public:
void setPluginEnabled(const QString& pluginName, bool enabled);
bool isPluginEnabled(const QString& pluginName) const;
+ DeviceLink::ConnectionStarted connectionSource() const;
+
public Q_SLOTS:
///sends a @p np package to the device
virtual bool sendPackage(NetworkPackage& np);
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list