Commit 499761ff authored by Ahmad Samir's avatar Ahmad Samir
Browse files

[KWalletEditor] Use new kwallet methods to populate the view list(s)

This requires kwallet 5.72.0; also bump min. required Qt version to 5.12
as that's what the kwallet framework currently requires.
parent 7602035c
......@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(kwalletmanager5 VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.59.0")
set(KF5_MIN_VERSION "5.72.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......
......@@ -981,11 +981,10 @@ void KWalletEditor::importWallet()
_w->setFolder(*f);
QMap<QString, QMap<QString, QString> > map;
bool readMap = false;
QMap<QString, QMap<QString, QString>> map = w->mapList(&readMap);
QSet<QString> mergedkeys; // prevents re-merging already merged entries.
int rc;
rc = w->readMapList(QStringLiteral("*"), map);
if (rc == 0) {
if (readMap) {
QMap<QString, QMap<QString, QString> >::ConstIterator me;
for (me = map.constBegin(); me != map.constEnd(); ++me) {
bool hasEntry = _w->hasEntry(me.key());
......@@ -1014,9 +1013,9 @@ void KWalletEditor::importWallet()
}
}
QMap<QString, QString> pwd;
rc = w->readPasswordList(QStringLiteral("*"), pwd);
if (rc == 0) {
bool readPassList = false;
QMap<QString, QString> pwd = w->passwordList(&readPassList);
if (readPassList) {
QMap<QString, QString>::ConstIterator pe;
for (pe = pwd.constBegin(); pe != pwd.constEnd(); ++pe) {
bool hasEntry = _w->hasEntry(pe.key());
......@@ -1044,9 +1043,9 @@ void KWalletEditor::importWallet()
}
}
QMap<QString, QByteArray> ent;
rc = w->readEntryList(QStringLiteral("*"), ent);
if (rc == 0) {
bool readEntries = false;
QMap<QString, QByteArray> ent = w->entriesList(&readEntries);
if (readEntries) {
QMap<QString, QByteArray>::ConstIterator ee;
for (ee = ent.constBegin(); ee != ent.constEnd(); ++ee) {
// prevent re-merging already merged entries.
......
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