From 63488781b9fa4d1a08bc76e63661c6219982cb98 Mon Sep 17 00:00:00 2001 From: Mauro Panzeri Date: Mon, 14 Oct 2013 18:25:44 +0200 Subject: [PATCH] Update device name on reconnection Since the remote device can now change its name, re-read the device name from the identityPackage REVIEW: 113203 --- kded/device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kded/device.cpp b/kded/device.cpp index a7c501eef..aee0c8b50 100644 --- a/kded/device.cpp +++ b/kded/device.cpp @@ -200,6 +200,9 @@ void Device::addLink(const NetworkPackage& identityPackage, DeviceLink* link) m_deviceLinks.append(link); + //re-read the device name from the identityPackage because it could have changed + m_deviceName = identityPackage.get("deviceName"); + //TODO: Do not read the key every time KSharedConfigPtr config = KSharedConfig::openConfig("kdeconnectrc"); const QString& key = config->group("myself").readEntry("privateKey",QString());