From 12fff7408ea7539d778a641bbf1746693d30ee2a Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 27 Oct 2020 17:45:28 +0100 Subject: Optimize build --- src/UserSettingsPage.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/UserSettingsPage.cpp') 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 #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include #include -#include #include "Cache.h" #include "Config.h" @@ -450,7 +450,8 @@ UserSettingsPage::UserSettingsPage(QSharedPointer 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()); } } -- cgit 1.5.1