summary refs log tree commit diff
path: root/src/UserSettingsPage.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-10-28 14:50:00 +0100
committerGitHub <noreply@github.com>2020-10-28 14:50:00 +0100
commitfd4f173966e1d7d4d6c40d07da2f2efa270afc82 (patch)
tree2770e82ae26157d69c5158e76de39129ddc57864 /src/UserSettingsPage.cpp
parentTranslated using Weblate (Russian) (diff)
parentDon't pass around empty timeline (diff)
downloadnheko-fd4f173966e1d7d4d6c40d07da2f2efa270afc82.tar.xz
Merge pull request #308 from Nheko-Reborn/build-opt
Optimize build
Diffstat (limited to 'src/UserSettingsPage.cpp')
-rw-r--r--src/UserSettingsPage.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp

index d4d5dcb9..78f9d546 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp
@@ -17,6 +17,7 @@ #include <QApplication> #include <QComboBox> +#include <QCoreApplication> #include <QFileDialog> #include <QFontComboBox> #include <QFormLayout> @@ -36,7 +37,6 @@ #include <QString> #include <QTextStream> #include <QtQml> -#include <QCoreApplication> #include "Cache.h" #include "Config.h" @@ -450,7 +450,8 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge auto versionInfo = new QLabel(QString("%1 | %2").arg(nheko::version).arg(nheko::build_os)); if (QCoreApplication::applicationName() != "nheko") - versionInfo->setText(versionInfo->text() + " | " + tr("profile: %1").arg(QCoreApplication::applicationName())); + versionInfo->setText(versionInfo->text() + " | " + + tr("profile: %1").arg(QCoreApplication::applicationName())); versionInfo->setTextInteractionFlags(Qt::TextBrowserInteraction); topBarLayout_ = new QHBoxLayout; @@ -904,11 +905,7 @@ UserSettingsPage::importSessionKeys() auto sessions = mtx::crypto::decrypt_exported_sessions(payload, password.toStdString()); cache::importSessionKeys(std::move(sessions)); - } catch (const mtx::crypto::sodium_exception &e) { - QMessageBox::warning(this, tr("Error"), e.what()); - } catch (const lmdb::error &e) { - QMessageBox::warning(this, tr("Error"), e.what()); - } catch (const nlohmann::json::exception &e) { + } catch (const std::exception &e) { QMessageBox::warning(this, tr("Error"), e.what()); } } @@ -956,11 +953,7 @@ UserSettingsPage::exportSessionKeys() QTextStream out(&file); out << prefix << newline << b64 << newline << suffix; file.close(); - } catch (const mtx::crypto::sodium_exception &e) { - QMessageBox::warning(this, tr("Error"), e.what()); - } catch (const lmdb::error &e) { - QMessageBox::warning(this, tr("Error"), e.what()); - } catch (const nlohmann::json::exception &e) { + } catch (const std::exception &e) { QMessageBox::warning(this, tr("Error"), e.what()); } }