Commit 3b315614 authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

remove KeyListView::slotReloadOrphaned()

We don't need special handling for orphaned keys anymore. They should be handled by the item model like any other key.

svn path=/branches/work/kgpg2/; revision=762677
parent d815d9f7
......@@ -511,35 +511,6 @@ void KeyListView::refreshcurrentkey(KeyListViewItem *current)
currentItem()->setOpen(keyIsOpen);
}
void KeyListView::slotReloadOrphaned()
{
QStringList issec;
KgpgInterface *interface = new KgpgInterface();
KgpgKeyList listkeys, seckeys;
seckeys = interface->readSecretKeys();
issec = seckeys;
listkeys = interface->readPublicKeys(true, issec);
for (int i = 0; i < listkeys.size(); ++i)
issec.removeAll(listkeys.at(i).fullId());
delete interface;
QStringList::Iterator it;
QStringList list;
for (it = issec.begin(); it != issec.end(); ++it)
if (findItemByKeyId(*it) == NULL)
list += *it;
if (list.size() != 0)
insertOrphans(seckeys);
setSelected(findItemByKeyId(*it), true);
emit statusMessage(statusCountMessage(), 1);
emit statusMessage(i18nc("No operation in progress", "Ready"), 0);
}
void KeyListView::insertOrphans(const KgpgKeyList &keys)
{
QStringList orphanList;
......
......@@ -138,7 +138,6 @@ private slots:
void refreshcurrentkey(const QString &id);
void refreshcurrentkey(KeyListViewItem *current);
void slotReloadOrphaned();
void insertOrphans(const KgpgKeyList &keys);
void refreshGroups();
......
......@@ -2160,7 +2160,6 @@ void KeysManager::slotPreImportKey()
// import from file
KgpgInterface *importKeyProcess = new KgpgInterface();
connect(importKeyProcess, SIGNAL(importKeyFinished(QStringList)), imodel, SLOT(refreshKeys(QStringList)));
connect(importKeyProcess, SIGNAL(importKeyOrphaned()), keysList2, SLOT(slotReloadOrphaned()));
importKeyProcess->importKey(KUrl(impname));
}
}
......@@ -2172,7 +2171,6 @@ void KeysManager::slotPreImportKey()
changeMessage(i18n("Importing..."), 0, true);
KgpgInterface *importKeyProcess = new KgpgInterface();
connect(importKeyProcess,SIGNAL(importKeyFinished(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
connect(importKeyProcess,SIGNAL(importKeyOrphaned()),keysList2,SLOT(slotReloadOrphaned()));
importKeyProcess->importKey(keystr);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment