From f765e9c0a8fe11601d0b874453467d9b5ab6db54 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sun, 21 Aug 2016 13:21:40 +0200 Subject: [PATCH] Actually compare the old plugin map We were comparing to the result after removing all the actually used plugins --- core/device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/device.cpp b/core/device.cpp index fb89cee56..a803bc175 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -94,7 +94,7 @@ QStringList Device::loadedPlugins() const void Device::reloadPlugins() { - QHash newPluginMap; + QHash newPluginMap, oldPluginMap = m_plugins; QMultiMap newPluginsByIncomingCapability; if (isTrusted() && isReachable()) { //Do not load any plugin for unpaired devices, nor useless loading them for unreachable devices @@ -124,7 +124,7 @@ void Device::reloadPlugins() } } - const bool differentPlugins = m_plugins != newPluginMap; + const bool differentPlugins = oldPluginMap != newPluginMap; //Erase all left plugins in the original map (meaning that we don't want //them anymore, otherwise they would have been moved to the newPluginMap)