1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

[KWalletPasswordBackend] Port KWallet::readEntryList() to KWallet::entriesList()

Currently the code is conditional so as to keep it building against
older kwallet versions.
This commit is contained in:
Ahmad Samir 2020-06-08 15:35:09 +02:00 committed by Juraj Oravec
parent 1cf46c9f10
commit 5d0c9bb238

View File

@ -23,6 +23,7 @@
#include <QDateTime>
#include <kwallet_version.h>
#include <KWallet>
static PasswordEntry decodeEntry(const QByteArray &data)
@ -220,7 +221,13 @@ void KWalletPasswordBackend::initialize()
}
QMap<QString, QByteArray> entries;
if (m_wallet->readEntryList("*", entries) != 0) {
bool ok = false;
#if KWALLET_VERSION < QT_VERSION_CHECK(5, 72, 0)
ok = m_wallet->readEntryList("*", entries) == 0;
#else
entries = m_wallet->entriesList(&ok);
#endif
if (!ok) {
qWarning() << "KWalletPasswordBackend::initialize Cannot read entries!";
return;
}