aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmerrors.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-26 15:20:53 +0200
committerGitHub <noreply@github.com>2022-09-26 15:20:53 +0200
commit4c8dcbc308eb0f4900e416e698f5f30e71daaad8 (patch)
treeaa5fdaa81234a21c6919fac4958f84d7c26cd397 /lib/e2ee/qolmerrors.cpp
parent5904a61c59f0eef00aef07ef998658fd791ff139 (diff)
parent15b840d82d4794358fbf1271ea76e446b47db7e5 (diff)
downloadlibquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.tar.gz
libquotient-4c8dcbc308eb0f4900e416e698f5f30e71daaad8.zip
Merge #571: Unify reporting and handling of Olm errors
Diffstat (limited to 'lib/e2ee/qolmerrors.cpp')
-rw-r--r--lib/e2ee/qolmerrors.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/e2ee/qolmerrors.cpp b/lib/e2ee/qolmerrors.cpp
deleted file mode 100644
index 5a60b7e6..00000000
--- a/lib/e2ee/qolmerrors.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org>
-//
-// SPDX-License-Identifier: LGPL-2.1-or-later
-
-
-#include "qolmerrors.h"
-#include "util.h"
-#include <QtCore/QLatin1String>
-
-Quotient::QOlmError Quotient::fromString(const char* error_raw) {
- const QLatin1String error { error_raw };
- if (error_raw == "BAD_ACCOUNT_KEY"_ls) {
- return QOlmError::BadAccountKey;
- } else if (error_raw == "BAD_MESSAGE_KEY_ID"_ls) {
- return QOlmError::BadMessageKeyId;
- } else if (error_raw == "INVALID_BASE64"_ls) {
- return QOlmError::InvalidBase64;
- } else if (error_raw == "NOT_ENOUGH_RANDOM"_ls) {
- return QOlmError::NotEnoughRandom;
- } else if (error_raw == "OUTPUT_BUFFER_TOO_SMALL"_ls) {
- return QOlmError::OutputBufferTooSmall;
- } else {
- return QOlmError::Unknown;
- }
-}