summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-01-31 16:08:30 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-01-31 16:08:30 +0100
commit127fb9370b8e131ad460b27aaa72de178e929096 (patch)
tree5278c11f1b58dc9f2600f716d58301f116d05d29 /src/Cache.cpp
parentOptimize includes a bit (diff)
downloadnheko-127fb9370b8e131ad460b27aaa72de178e929096.tar.xz
Remove metatypes from headers
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index f6f8052d..dfd7475c 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -80,7 +80,7 @@ using CachedReceipts = std::multimap<uint64_t, std::string, std::greater<uint64_
 using Receipts       = std::map<std::string, std::map<std::string, uint64_t>>;
 
 Q_DECLARE_METATYPE(SearchResult)
-Q_DECLARE_METATYPE(QVector<SearchResult>)
+Q_DECLARE_METATYPE(std::vector<SearchResult>)
 Q_DECLARE_METATYPE(RoomMember)
 Q_DECLARE_METATYPE(mtx::responses::Timeline)
 Q_DECLARE_METATYPE(RoomSearchResult)
@@ -1834,7 +1834,7 @@ Cache::searchRooms(const std::string &query, std::uint8_t max_items)
         return results;
 }
 
-QVector<SearchResult>
+std::vector<SearchResult>
 Cache::searchUsers(const std::string &room_id, const std::string &query, std::uint8_t max_items)
 {
         std::multimap<int, std::pair<std::string, std::string>> items;
@@ -1857,7 +1857,7 @@ Cache::searchUsers(const std::string &room_id, const std::string &query, std::ui
         else if (items.size() > 0)
                 std::advance(end, items.size());
 
-        QVector<SearchResult> results;
+        std::vector<SearchResult> results;
         for (auto it = items.begin(); it != end; it++) {
                 const auto user = it->second;
                 results.push_back(SearchResult{QString::fromStdString(user.first),
@@ -2390,12 +2390,11 @@ void
 init(const QString &user_id)
 {
         qRegisterMetaType<SearchResult>();
-        qRegisterMetaType<QVector<SearchResult>>();
+        qRegisterMetaType<std::vector<SearchResult>>();
         qRegisterMetaType<RoomMember>();
         qRegisterMetaType<RoomSearchResult>();
         qRegisterMetaType<RoomInfo>();
         qRegisterMetaType<QMap<QString, RoomInfo>>();
-        qRegisterMetaType<QMap<QString, mtx::responses::Notifications>>();
         qRegisterMetaType<std::map<QString, RoomInfo>>();
         qRegisterMetaType<std::map<QString, mtx::responses::Timeline>>();
 
@@ -2734,7 +2733,7 @@ calculateRoomReadStatus()
         instance_->calculateRoomReadStatus();
 }
 
-QVector<SearchResult>
+std::vector<SearchResult>
 searchUsers(const std::string &room_id, const std::string &query, std::uint8_t max_items)
 {
         return instance_->searchUsers(room_id, query, max_items);