summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-21 18:08:52 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-21 18:08:52 (GMT)
commitf8d02bcb5768d58686110689030686afbc496c4e (patch)
tree469f6fa1ea4252a88d02fb196e635b318a0ce6c4
parenta30d9bd811a32bdb7d2d74774479fd511e425169 (diff)
only refresh keys after importing if at least one key was received
Otherwise all keys would have been reloaded when nothing was actually changed.
-rw-r--r--keysmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/keysmanager.cpp b/keysmanager.cpp
index 3bce780..061fee9 100644
--- a/keysmanager.cpp
+++ b/keysmanager.cpp
@@ -2180,11 +2180,11 @@ void KeysManager::importRemoteFinished(int result)
KGpgReceiveKeys *t = qobject_cast<KGpgReceiveKeys *>(sender());
Q_ASSERT(t != Q_NULLPTR);
- const QStringList keys(KGpgImport::getImportedIds(t->getLog()));
+ const QStringList keys = KGpgImport::getImportedIds(t->getLog());
t->deleteLater();
- if (result == KGpgTransaction::TS_OK)
+ if ((result == KGpgTransaction::TS_OK) && !keys.isEmpty())
imodel->refreshKeys(keys);
}