summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-21 18:39:31 (GMT)
committerRolf Eike Beer <kde@opensource.sf-tec.de>2016-10-21 18:39:31 (GMT)
commitd7f69b3df30b6b42995ef9b30a33496eb8e5c886 (patch)
tree44f5993d5dfc8ef96e135c649249299217662d54
parent4ce59c06857aeb40dbb1b2ea1bbc0479797d12af (diff)
get rid of KGpgItemModel::refreshKeyIds()
Move the implementations directly into KGpgItemModel::refreshKeys() as those are the only callers.
-rw-r--r--model/kgpgitemmodel.cpp46
-rw-r--r--model/kgpgitemmodel.h2
2 files changed, 17 insertions, 31 deletions
diff --git a/model/kgpgitemmodel.cpp b/model/kgpgitemmodel.cpp
index c2b803e..71b318d 100644
--- a/model/kgpgitemmodel.cpp
+++ b/model/kgpgitemmodel.cpp
@@ -419,18 +419,6 @@ KGpgItemModel::nodeIndex(KGpgNode *node, const int column)
return QModelIndex();
}
-void
-KGpgItemModel::refreshKeys(const QStringList &ids)
-{
- refreshKeyIds(ids);
-}
-
-void
-KGpgItemModel::refreshKeys(KGpgKeyNode::List keys)
-{
- refreshKeyIds(keys);
-}
-
static QStringList
readGroups()
{
@@ -438,21 +426,7 @@ readGroups()
}
void
-KGpgItemModel::refreshAllKeys()
-{
- beginResetModel();
-
- for (int i = m_root->getChildCount() - 1; i >= 0; i--)
- delete m_root->getChild(i);
- m_root->addKeys();
-
- m_root->addGroups(readGroups());
-
- endResetModel();
-}
-
-void
-KGpgItemModel::refreshKeyIds(const QStringList &ids)
+KGpgItemModel::refreshKeys(const QStringList &ids)
{
if (ids.isEmpty()) {
refreshAllKeys();
@@ -483,10 +457,24 @@ KGpgItemModel::refreshKeyIds(const QStringList &ids)
}
void
-KGpgItemModel::refreshKeyIds(KGpgKeyNode::List &nodes)
+KGpgItemModel::refreshKeys(KGpgKeyNode::List keys)
+{
+ beginResetModel();
+ m_root->refreshKeys(keys);
+ endResetModel();
+}
+
+void
+KGpgItemModel::refreshAllKeys()
{
beginResetModel();
- m_root->refreshKeys(nodes);
+
+ for (int i = m_root->getChildCount() - 1; i >= 0; i--)
+ delete m_root->getChild(i);
+ m_root->addKeys();
+
+ m_root->addGroups(readGroups());
+
endResetModel();
}
diff --git a/model/kgpgitemmodel.h b/model/kgpgitemmodel.h
index c24badc..7fe2981 100644
--- a/model/kgpgitemmodel.h
+++ b/model/kgpgitemmodel.h
@@ -94,8 +94,6 @@ public Q_SLOTS:
protected:
int rowForNode(KGpgNode *node) const;
- void refreshKeyIds(const QStringList &id);
- void refreshKeyIds(KGpgKeyNode::List &nodes);
void updateNodeTrustColor(KGpgExpandableNode *node, const KgpgCore::KgpgKeyTrust trust, const QColor &color);
};