summary refs log tree commit diff
path: root/src/ChatPage.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 17:08:36 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 18:59:38 +0100
commit659e36b113158ba9870e201dab7098888bf9d275 (patch)
tree1c8bf23cc0554c63a6bb7f4214348325330f781f /src/ChatPage.cpp
parentClear appveyor cache (diff)
downloadnheko-659e36b113158ba9870e201dab7098888bf9d275.tar.xz
Update to c++17
Diffstat (limited to 'src/ChatPage.cpp')
-rw-r--r--src/ChatPage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index 35d262ac..c496acab 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -54,7 +54,7 @@ constexpr int CHECK_CONNECTIVITY_INTERVAL = 15'000;
 constexpr int RETRY_TIMEOUT               = 5'000;
 constexpr size_t MAX_ONETIME_KEYS         = 50;
 
-Q_DECLARE_METATYPE(boost::optional<mtx::crypto::EncryptedFile>)
+Q_DECLARE_METATYPE(std::optional<mtx::crypto::EncryptedFile>)
 
 ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
   : QWidget(parent)
@@ -64,8 +64,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
 {
         setObjectName("chatPage");
 
-        qRegisterMetaType<boost::optional<mtx::crypto::EncryptedFile>>(
-          "boost::optional<mtx::crypto::EncryptedFile>");
+        qRegisterMetaType<std::optional<mtx::crypto::EncryptedFile>>(
+          "std::optional<mtx::crypto::EncryptedFile>");
 
         topLayout_ = new QHBoxLayout(this);
         topLayout_->setSpacing(0);
@@ -318,7 +318,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
 
                   auto bin     = dev->peek(dev->size());
                   auto payload = std::string(bin.data(), bin.size());
-                  boost::optional<mtx::crypto::EncryptedFile> encryptedFile;
+                  std::optional<mtx::crypto::EncryptedFile> encryptedFile;
                   if (cache::client()->isRoomEncrypted(current_room_.toStdString())) {
                           mtx::crypto::BinaryBuf buf;
                           std::tie(buf, encryptedFile) = mtx::crypto::encrypt_file(payload);
@@ -371,7 +371,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
                 this,
                 [this](QString roomid,
                        QString filename,
-                       boost::optional<mtx::crypto::EncryptedFile> encryptedFile,
+                       std::optional<mtx::crypto::EncryptedFile> encryptedFile,
                        QString url,
                        QString mimeClass,
                        QString mime,