summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-18 18:48:14 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-18 18:48:14 +0300
commit3e49afd6ba15a763909694e6db8ececd85914e8a (patch)
treecf305615dafe5d19002ed867ac10f4c159fa6405
parentInstall libsodium 1.0.16 (diff)
downloadnheko-3e49afd6ba15a763909694e6db8ececd85914e8a.tar.xz
Fix compile warnings
-rw-r--r--deps/CMakeLists.txt4
-rw-r--r--src/UserSettingsPage.cpp4
-rw-r--r--src/Utils.cpp8
3 files changed, 9 insertions, 7 deletions
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt
index 57d37a61..f1905718 100644
--- a/deps/CMakeLists.txt
+++ b/deps/CMakeLists.txt
@@ -39,10 +39,10 @@ set(BOOST_SHA256
 
 set(
   MTXCLIENT_URL
-  https://github.com/mujx/mtxclient/archive/49a3ffddc13482902b73312a4a6d2e62dddaef64.tar.gz
+  https://github.com/mujx/mtxclient/archive/99ca7480d15a82a7b8c5099be5f076c0ceecc9f7.tar.gz
   )
 set(MTXCLIENT_HASH
-    181b5d99cdf4639336f54af369f3a2feef089608716adccff9412440eac1e8b1)
+    e88a8c4473b6bc37c046779ea2345da00abb88a755447b9ac77ed76c89975e9d)
 
 set(
   TWEENY_URL
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index 94c21538..b8223a58 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -503,7 +503,7 @@ UserSettingsPage::importSessionKeys()
                 auto sessions = mtx::crypto::decrypt_exported_sessions(
                   mtx::crypto::base642bin(payload), password.toStdString());
                 cache::client()->importSessionKeys(std::move(sessions));
-        } catch (const std::exception &e) {
+        } 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());
@@ -547,7 +547,7 @@ UserSettingsPage::exportSessionKeys()
                 auto b64 = mtx::crypto::bin2base64(encrypted_blob);
 
                 file.write(b64.data(), b64.size());
-        } catch (const std::exception &e) {
+        } 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());
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 82959b46..221f89a0 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -314,11 +314,13 @@ utils::linkifyMessage(const QString &body)
                         if (xml.name() == "html")
                                 break;
 
-                        textString += "<" + xml.name();
+                        textString += QString("<%1").arg(xml.name().toString());
 
                         const auto attrs = xml.attributes();
                         for (const auto &e : attrs)
-                                textString += QString(" %1=\"%2\"").arg(e.name()).arg(e.value());
+                                textString += QString(" %1=\"%2\"")
+                                                .arg(e.name().toString())
+                                                .arg(e.value().toString());
 
                         textString += ">";
 
@@ -328,7 +330,7 @@ utils::linkifyMessage(const QString &body)
                         if (xml.name() == "html")
                                 break;
 
-                        textString += "</" + xml.name() + ">";
+                        textString += QString("</%1>").arg(xml.name().toString());
                         break;
                 }
                 default: {