Actually compare the old plugin map
We were comparing to the result after removing all the actually used plugins
This commit is contained in:
parent
a96818113d
commit
f765e9c0a8
1 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ QStringList Device::loadedPlugins() const
|
||||||
|
|
||||||
void Device::reloadPlugins()
|
void Device::reloadPlugins()
|
||||||
{
|
{
|
||||||
QHash<QString, KdeConnectPlugin*> newPluginMap;
|
QHash<QString, KdeConnectPlugin*> newPluginMap, oldPluginMap = m_plugins;
|
||||||
QMultiMap<QString, KdeConnectPlugin*> newPluginsByIncomingCapability;
|
QMultiMap<QString, KdeConnectPlugin*> newPluginsByIncomingCapability;
|
||||||
|
|
||||||
if (isTrusted() && isReachable()) { //Do not load any plugin for unpaired devices, nor useless loading them for unreachable devices
|
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
|
//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)
|
//them anymore, otherwise they would have been moved to the newPluginMap)
|
||||||
|
|
Loading…
Reference in a new issue