mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01: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:
parent
1cf46c9f10
commit
5d0c9bb238
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user