From 139a6743a4e7a3b2e380d4f3e8f43558bc3164fa Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Fri, 13 Apr 2018 20:32:08 +0900 Subject: Support Qt 5.4 That is until ubports move to xenial. --- lib/connection.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/connection.h') 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; + 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, -- cgit v1.2.3