aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-15 23:03:03 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-15 23:03:03 +0900
commit1ae42237adcc5486e526ff3a9e93d0901940a74b (patch)
tree149cea4ef92822a9ebd11e5c9c1118232461f81f
parent4aa8eb029737f536a6ad3b1e3eaf296a68a3b926 (diff)
downloadlibquotient-1ae42237adcc5486e526ff3a9e93d0901940a74b.tar.gz
libquotient-1ae42237adcc5486e526ff3a9e93d0901940a74b.zip
Connection::forgetRoom(): Minor fixes
-rw-r--r--connection.cpp3
-rw-r--r--connection.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/connection.cpp b/connection.cpp
index 749d2062..84a52149 100644
--- a/connection.cpp
+++ b/connection.cpp
@@ -237,7 +237,7 @@ MediaThumbnailJob* Connection::getThumbnail(const QUrl& url, int requestedWidth,
return getThumbnail(url, QSize(requestedWidth, requestedHeight));
}
-ForgetRoomJob* Connection::forgetRoom(const QString& id) const
+ForgetRoomJob* Connection::forgetRoom(const QString& id)
{
// To forget is hard :) First we should ensure the local user is not
// in the room (by leaving it, if necessary); once it's done, the /forget
@@ -265,6 +265,7 @@ ForgetRoomJob* Connection::forgetRoom(const QString& id) const
for (auto f: {false, true})
if (auto r = d->roomMap.take({ id, f }))
{
+ emit aboutToDeleteRoom(r);
qCDebug(MAIN) << "Room" << id
<< "in join state" << toCString(r->joinState())
<< "will be deleted";
diff --git a/connection.h b/connection.h
index 4afae08f..b7d049f1 100644
--- a/connection.h
+++ b/connection.h
@@ -107,7 +107,7 @@ namespace QMatrixClient
* of a respective room so by the moment this finishes, there might be no
* Room object anymore.
*/
- ForgetRoomJob* forgetRoom(const QString& id) const;
+ ForgetRoomJob* forgetRoom(const QString& id);
Q_INVOKABLE QUrl homeserver() const;
Q_INVOKABLE User* user(const QString& userId);