diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/converters.h | 8 | ||||
-rw-r--r-- | lib/events/roomavatarevent.cpp | 23 | ||||
-rw-r--r-- | lib/jobs/postreadmarkersjob.h | 2 | ||||
-rw-r--r-- | lib/jobs/postreceiptjob.cpp | 27 | ||||
-rw-r--r-- | lib/jobs/postreceiptjob.h | 30 |
5 files changed, 6 insertions, 84 deletions
diff --git a/lib/converters.h b/lib/converters.h index 28bb14cf..a59809e7 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -65,8 +65,8 @@ namespace QMatrixClient public: explicit Omittable() : Omittable(none) { } Omittable(NoneTag) : _omitted(true) { } - Omittable(const T& val) : _value(val), _omitted(false) { } - Omittable(T&& val) : _value(std::move(val)), _omitted(false) { } + Omittable(const T& val) : _value(val) { } + Omittable(T&& val) : _value(std::move(val)) { } Omittable<T>& operator=(const T& val) { _value = val; @@ -89,7 +89,7 @@ namespace QMatrixClient private: T _value; - bool _omitted; + bool _omitted = false; }; // This catches anything implicitly convertible to QJsonValue/Object/Array @@ -175,7 +175,7 @@ namespace QMatrixClient template <typename T> struct FromJson { - T operator()(const QJsonValue& jv) const { return static_cast<T>(jv); } + T operator()(const QJsonValue& jv) const { return T(jv); } }; template <typename T> diff --git a/lib/events/roomavatarevent.cpp b/lib/events/roomavatarevent.cpp deleted file mode 100644 index 7a5f82a1..00000000 --- a/lib/events/roomavatarevent.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2017 Kitsune Ral <kitsune-ral@users.sf.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "roomavatarevent.h" - -using namespace QMatrixClient; - - diff --git a/lib/jobs/postreadmarkersjob.h b/lib/jobs/postreadmarkersjob.h index d0198821..63a8e1d0 100644 --- a/lib/jobs/postreadmarkersjob.h +++ b/lib/jobs/postreadmarkersjob.h @@ -20,6 +20,8 @@ #include "basejob.h" +#include <QtCore/QJsonObject> + using namespace QMatrixClient; class PostReadMarkersJob : public BaseJob diff --git a/lib/jobs/postreceiptjob.cpp b/lib/jobs/postreceiptjob.cpp deleted file mode 100644 index 4572d74c..00000000 --- a/lib/jobs/postreceiptjob.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2016 Felix Rohrbach <kde@fxrh.de> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "postreceiptjob.h" - -using namespace QMatrixClient; - -PostReceiptJob::PostReceiptJob(const QString& roomId, const QString& eventId) - : BaseJob(HttpVerb::Post, "PostReceiptJob", - QStringLiteral("/_matrix/client/r0/rooms/%1/receipt/m.read/%2") - .arg(roomId, eventId)) -{ } diff --git a/lib/jobs/postreceiptjob.h b/lib/jobs/postreceiptjob.h deleted file mode 100644 index 23df7c05..00000000 --- a/lib/jobs/postreceiptjob.h +++ /dev/null @@ -1,30 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2016 Felix Rohrbach <kde@fxrh.de> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#pragma once - -#include "basejob.h" - -namespace QMatrixClient -{ - class PostReceiptJob: public BaseJob - { - public: - PostReceiptJob(const QString& roomId, const QString& eventId); - }; -} |