aboutsummaryrefslogtreecommitdiff
path: root/autotests/testolmaccount.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 09:44:20 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 10:46:34 +0200
commit363a7e40e8aa12cb780b076cca8db4f47b70f4fa (patch)
treee5c8d796415114f46c84ba39f25a42c4ad400311 /autotests/testolmaccount.cpp
parenta923750c7a1efadaa66f24dc17010063776e6246 (diff)
downloadlibquotient-363a7e40e8aa12cb780b076cca8db4f47b70f4fa.tar.gz
libquotient-363a7e40e8aa12cb780b076cca8db4f47b70f4fa.zip
Replace QOlmError with OlmErrorCode
QOlmError represents a subset of OlmErrorCode, and the associated fromString() function uses undocumented strings produced inside Olm; meanwhile OlmErrorCode is documented in its own header file. Each QOlm* class now has lastErrorCode() next to lastError() (that, from now, returns a textual representation straight from Olm, not QOlmError enum). Also: including olm/error.h in e2ee/e2ee.h required some rearrangement of the code to make sure non-E2EE configuration still builds.
Diffstat (limited to 'autotests/testolmaccount.cpp')
-rw-r--r--autotests/testolmaccount.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/autotests/testolmaccount.cpp b/autotests/testolmaccount.cpp
index 280705d0..eb428661 100644
--- a/autotests/testolmaccount.cpp
+++ b/autotests/testolmaccount.cpp
@@ -25,7 +25,8 @@ void TestOlmAccount::pickleUnpickledTest()
auto identityKeys = olmAccount.identityKeys();
auto pickled = olmAccount.pickle(Unencrypted{}).value();
QOlmAccount olmAccount2(QStringLiteral("@foo:bar.com"), QStringLiteral("QuotientTestDevice"));
- olmAccount2.unpickle(pickled, Unencrypted{});
+ auto unpickleResult = olmAccount2.unpickle(pickled, Unencrypted{});
+ QCOMPARE(unpickleResult, 0);
auto identityKeys2 = olmAccount2.identityKeys();
QCOMPARE(identityKeys.curve25519, identityKeys2.curve25519);
QCOMPARE(identityKeys.ed25519, identityKeys2.ed25519);