From 659e36b113158ba9870e201dab7098888bf9d275 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 14 Dec 2019 17:08:36 +0100 Subject: Update to c++17 --- src/ChatPage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ChatPage.cpp') 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) +Q_DECLARE_METATYPE(std::optional) ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) : QWidget(parent) @@ -64,8 +64,8 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) { setObjectName("chatPage"); - qRegisterMetaType>( - "boost::optional"); + qRegisterMetaType>( + "std::optional"); topLayout_ = new QHBoxLayout(this); topLayout_->setSpacing(0); @@ -318,7 +318,7 @@ ChatPage::ChatPage(QSharedPointer userSettings, QWidget *parent) auto bin = dev->peek(dev->size()); auto payload = std::string(bin.data(), bin.size()); - boost::optional encryptedFile; + std::optional 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, QWidget *parent) this, [this](QString roomid, QString filename, - boost::optional encryptedFile, + std::optional encryptedFile, QString url, QString mimeClass, QString mime, -- cgit 1.5.1