From 6e80ef5b5776eb09f14b6815c2f4d6dbec69dffd Mon Sep 17 00:00:00 2001 From: Roman Plášil Date: Mon, 13 Feb 2017 18:26:33 +0800 Subject: Fix qmake compilation --- libqmatrixclient.pri | 15 ++++++--------- room.cpp | 2 ++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libqmatrixclient.pri b/libqmatrixclient.pri index b5155f96..d2d4c088 100644 --- a/libqmatrixclient.pri +++ b/libqmatrixclient.pri @@ -8,7 +8,6 @@ HEADERS += \ $$PWD/connection.h \ $$PWD/room.h \ $$PWD/user.h \ - $$PWD/logmessage.h \ $$PWD/state.h \ $$PWD/events/event.h \ $$PWD/events/roommessageevent.h \ @@ -19,7 +18,6 @@ HEADERS += \ $$PWD/events/roomtopicevent.h \ $$PWD/events/typingevent.h \ $$PWD/events/receiptevent.h \ - $$PWD/events/unknownevent.h \ $$PWD/jobs/basejob.h \ $$PWD/jobs/checkauthmethods.h \ $$PWD/jobs/passwordlogin.h \ @@ -27,19 +25,18 @@ HEADERS += \ $$PWD/jobs/postreceiptjob.h \ $$PWD/jobs/joinroomjob.h \ $$PWD/jobs/leaveroomjob.h \ - $$PWD/jobs/roommembersjob.h \ $$PWD/jobs/roommessagesjob.h \ $$PWD/jobs/syncjob.h \ $$PWD/jobs/mediathumbnailjob.h \ - $$PWD/jobs/logoutjob.h + $$PWD/jobs/logoutjob.h \ + $$PWD/logging.h \ + $$PWD/settings.h SOURCES += \ $$PWD/connectiondata.cpp \ $$PWD/connection.cpp \ $$PWD/room.cpp \ $$PWD/user.cpp \ - $$PWD/logmessage.cpp \ - $$PWD/state.cpp \ $$PWD/events/event.cpp \ $$PWD/events/roommessageevent.cpp \ $$PWD/events/roomnameevent.cpp \ @@ -49,7 +46,6 @@ SOURCES += \ $$PWD/events/roomtopicevent.cpp \ $$PWD/events/typingevent.cpp \ $$PWD/events/receiptevent.cpp \ - $$PWD/events/unknownevent.cpp \ $$PWD/jobs/basejob.cpp \ $$PWD/jobs/checkauthmethods.cpp \ $$PWD/jobs/passwordlogin.cpp \ @@ -57,8 +53,9 @@ SOURCES += \ $$PWD/jobs/postreceiptjob.cpp \ $$PWD/jobs/joinroomjob.cpp \ $$PWD/jobs/leaveroomjob.cpp \ - $$PWD/jobs/roommembersjob.cpp \ $$PWD/jobs/roommessagesjob.cpp \ $$PWD/jobs/syncjob.cpp \ $$PWD/jobs/mediathumbnailjob.cpp \ - $$PWD/jobs/logoutjob.cpp + $$PWD/jobs/logoutjob.cpp \ + $$PWD/logging.cpp \ + $$PWD/settings.cpp diff --git a/room.cpp b/room.cpp index 6c22b338..9d501556 100644 --- a/room.cpp +++ b/room.cpp @@ -24,6 +24,8 @@ #include #include // for efficient string concats (operator%) #include +#include +#include #include "connection.h" #include "state.h" -- cgit v1.2.3 From 67b75e13db0d9b201c92d74e829e45d043313be7 Mon Sep 17 00:00:00 2001 From: Roman Plášil Date: Fri, 2 Jun 2017 11:18:15 +0800 Subject: Clean up --- room.cpp | 2 -- settings.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/room.cpp b/room.cpp index 9d501556..6c22b338 100644 --- a/room.cpp +++ b/room.cpp @@ -24,8 +24,6 @@ #include #include // for efficient string concats (operator%) #include -#include -#include #include "connection.h" #include "state.h" diff --git a/settings.h b/settings.h index 10b2bb0a..eab0679a 100644 --- a/settings.h +++ b/settings.h @@ -20,9 +20,9 @@ #include #include +#include class QVariant; -class QUrl; namespace QMatrixClient { -- cgit v1.2.3 From 6aef84109f68e07d71432d5bb8437e33eaeed940 Mon Sep 17 00:00:00 2001 From: Roman Plášil Date: Mon, 13 Feb 2017 09:24:52 +0800 Subject: Add Room::memberNames() for nick completion in QML --- room.cpp | 10 ++++++++++ room.h | 1 + 2 files changed, 11 insertions(+) diff --git a/room.cpp b/room.cpp index 6c22b338..49517ab9 100644 --- a/room.cpp +++ b/room.cpp @@ -370,6 +370,16 @@ QList< User* > Room::users() const return d->membersMap.values(); } +QStringList Room::memberNames() const { + QStringList res; + + for (auto u : d->membersMap.values()) { + res.append( this->roomMembername(u) ); + } + + return res; +} + void Room::Private::insertMemberIntoMap(User *u) { auto namesakes = membersMap.values(u->name()); diff --git a/room.h b/room.h index 4f7a3c97..a847161d 100644 --- a/room.h +++ b/room.h @@ -90,6 +90,7 @@ namespace QMatrixClient QList membersLeft() const; Q_INVOKABLE QList users() const; + Q_INVOKABLE QStringList memberNames() const; /** * @brief Produces a disambiguated name for a given user in -- cgit v1.2.3