aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-04-13 20:32:08 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-04-13 20:33:00 +0900
commit139a6743a4e7a3b2e380d4f3e8f43558bc3164fa (patch)
tree7bf5321a78d731299d68973316a1843c0d238f85 /lib/connection.h
parentbf1dc1484ad5aefd5b86f7f79f23f5d6fc9b940a (diff)
downloadlibquotient-139a6743a4e7a3b2e380d4f3e8f43558bc3164fa.tar.gz
libquotient-139a6743a4e7a3b2e380d4f3e8f43558bc3164fa.zip
Support Qt 5.4
That is until ubports move to xenial.
Diffstat (limited to 'lib/connection.h')
-rw-r--r--lib/connection.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/connection.h b/lib/connection.h
index be414931..839371ef 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -66,6 +66,10 @@ namespace QMatrixClient
using DirectChatsMap = QMultiHash<const User*, QString>;
+ using AccountDataMap = std::conditional_t<
+ QT_VERSION >= QT_VERSION_CHECK(5, 5, 0),
+ QVariantHash, QVariantMap>;
+
enum RoomVisibility { PublishRoom, UnpublishRoom }; // FIXME: Should go inside CreateRoomJob
explicit Connection(QObject* parent = nullptr);
@@ -88,7 +92,7 @@ namespace QMatrixClient
* stored on the server. Direct chats map cannot be retrieved
* using this method _yet_; use directChats() instead.
*/
- QVariantHash accountData(const QString& type) const;
+ AccountDataMap accountData(const QString& type) const;
/** Get all Invited and Joined rooms grouped by tag
* \return a hashmap from tag name to a vector of room pointers,