transition to LMDBAL

This commit is contained in:
Blue 2023-03-27 21:45:29 +03:00
parent 69d797fe51
commit 81cf0f8d34
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
18 changed files with 76 additions and 42 deletions

View file

@ -35,7 +35,7 @@ Core::OmemoHandler::OmemoHandler(Account* account) :
QVariant own = meta->getRecord("ownDevice");
ownDevice = own.value<OwnDevice>();
qDebug() << "Successfully found own device omemo data for account" << acc->getName();
} catch (const DataBase::NotFound& e) {
} catch (const LMDBAL::NotFound& e) {
qDebug() << "No device omemo data was found for account" << acc->getName();
}
}
@ -76,7 +76,7 @@ QXmppTask<void> Core::OmemoHandler::addDevice(const QString& jid, uint32_t devic
bool had = true;
try {
devs = devices->getRecord(jid);
} catch (const DataBase::NotFound& error) {
} catch (const LMDBAL::NotFound& error) {
had = false;
}
@ -127,7 +127,7 @@ QXmppTask<void> Core::OmemoHandler::removePreKeyPair(uint32_t keyId) {
QXmppTask<void> Core::OmemoHandler::removeSignedPreKeyPair(uint32_t keyId) {
try {
signedPreKeyPairs->removeRecord(keyId);
} catch (const DataBase::NotFound& e) {}
} catch (const LMDBAL::NotFound& e) {}
return Core::makeReadyTask();
}
@ -159,7 +159,7 @@ void Core::OmemoHandler::getDevices(const QString& jid, std::list<Shared::KeyInf
QHash<uint32_t, Device> devs;
try {
devs = devices->getRecord(jid);
} catch (const DataBase::NotFound& error) {}
} catch (const LMDBAL::NotFound& error) {}
for (QHash<uint32_t, Device>::const_iterator itr = devs.begin(), end = devs.end(); itr != end; ++itr) {
const Device& dev = itr.value();