aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--lib/converters.h8
-rw-r--r--lib/events/roomavatarevent.cpp23
-rw-r--r--lib/jobs/postreadmarkersjob.h2
-rw-r--r--lib/jobs/postreceiptjob.cpp27
-rw-r--r--lib/jobs/postreceiptjob.h30
-rw-r--r--libqmatrixclient.pri2
7 files changed, 6 insertions, 87 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5456797..54b69457 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,7 +84,6 @@ set(libqmatrixclient_SRCS
lib/events/eventcontent.cpp
lib/events/roommessageevent.cpp
lib/events/roommemberevent.cpp
- lib/events/roomavatarevent.cpp
lib/events/typingevent.cpp
lib/events/receiptevent.cpp
lib/events/directchatevent.cpp
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);
- };
-}
diff --git a/libqmatrixclient.pri b/libqmatrixclient.pri
index 7d81c1db..e61b50c8 100644
--- a/libqmatrixclient.pri
+++ b/libqmatrixclient.pri
@@ -31,7 +31,6 @@ HEADERS += \
$$SRCPATH/jobs/requestdata.h \
$$SRCPATH/jobs/basejob.h \
$$SRCPATH/jobs/sendeventjob.h \
- $$SRCPATH/jobs/postreceiptjob.h \
$$SRCPATH/jobs/syncjob.h \
$$SRCPATH/jobs/mediathumbnailjob.h \
$$SRCPATH/jobs/downloadfilejob.h \
@@ -61,7 +60,6 @@ SOURCES += \
$$SRCPATH/jobs/requestdata.cpp \
$$SRCPATH/jobs/basejob.cpp \
$$SRCPATH/jobs/sendeventjob.cpp \
- $$SRCPATH/jobs/postreceiptjob.cpp \
$$SRCPATH/jobs/syncjob.cpp \
$$SRCPATH/jobs/mediathumbnailjob.cpp \
$$SRCPATH/jobs/downloadfilejob.cpp \