aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-22 14:34:40 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-22 14:34:40 +0900
commitdefbad696b924835de9bb8b16e0055a6cc983566 (patch)
treec6878c3110bf0f52e54e5bffd75e0d792d6171c0 /connection.h
parentf772058ab4d57c9503bb1e1e4354c246bde7cdb6 (diff)
downloadlibquotient-defbad696b924835de9bb8b16e0055a6cc983566.tar.gz
libquotient-defbad696b924835de9bb8b16e0055a6cc983566.zip
Undeprecated Connection::getThumbnail(), moved Q_INVOKABLE calls to slots
Connection::getThumbnail() should not have been deprecated because it's the only way to request a thumbnail using an event loop (i.e. from QML or via QMetaObject::invokeMethod).
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/connection.h b/connection.h
index adf7a098..da211371 100644
--- a/connection.h
+++ b/connection.h
@@ -61,27 +61,6 @@ namespace QMatrixClient
QHash<QPair<QString, bool>, Room*> roomMap() const;
- // Old API that will be abolished any time soon. DO NOT USE.
-
- /** @deprecated Use callApi<PostMessageJob>() or Room::postMessage() instead */
- Q_INVOKABLE virtual void postMessage(Room* room, const QString& type,
- const QString& message) const;
- /** @deprecated Use callApi<PostReceiptJob>() or Room::postReceipt() instead */
- Q_INVOKABLE virtual PostReceiptJob* postReceipt(Room* room,
- RoomEvent* event) const;
- /** @deprecated Use callApi<JoinRoomJob>() instead */
- Q_INVOKABLE virtual JoinRoomJob* joinRoom(const QString& roomAlias);
- /** @deprecated Use callApi<LeaveRoomJob>() or Room::leaveRoom() instead */
- Q_INVOKABLE virtual void leaveRoom( Room* room );
- /** @deprecated User callApi<RoomMessagesJob>() or Room::getPreviousContent() instead */
- Q_INVOKABLE virtual RoomMessagesJob* getMessages(Room* room,
- const QString& from) const;
- /** @deprecated Use callApi<MediaThumbnailJob>() instead */
- virtual MediaThumbnailJob* getThumbnail(const QUrl& url,
- QSize requestedSize) const;
- /** @deprecated Use callApi<MediaThumbnailJob>() instead */
- MediaThumbnailJob* getThumbnail(const QUrl& url, int requestedWidth,
- int requestedHeight) const;
/** Sends /forget to the server and also deletes room locally.
* This method is in Connection, not in Room, since it's a
* room lifecycle operation, and Connection is an acting room manager.
@@ -188,6 +167,27 @@ namespace QMatrixClient
void sync(int timeout = -1);
void stopSync();
+ virtual MediaThumbnailJob* getThumbnail(const QUrl& url,
+ QSize requestedSize) const;
+ MediaThumbnailJob* getThumbnail(const QUrl& url,
+ int requestedWidth,
+ int requestedHeight) const;
+
+ // Old API that will be abolished any time soon. DO NOT USE.
+
+ /** @deprecated Use callApi<PostMessageJob>() or Room::postMessage() instead */
+ virtual void postMessage(Room* room, const QString& type,
+ const QString& message) const;
+ /** @deprecated Use callApi<PostReceiptJob>() or Room::postReceipt() instead */
+ virtual PostReceiptJob* postReceipt(Room* room,
+ RoomEvent* event) const;
+ /** @deprecated Use callApi<JoinRoomJob>() instead */
+ virtual JoinRoomJob* joinRoom(const QString& roomAlias);
+ /** @deprecated Use callApi<LeaveRoomJob>() or Room::leaveRoom() instead */
+ virtual void leaveRoom( Room* room );
+ /** @deprecated User callApi<RoomMessagesJob>() or Room::getPreviousContent() instead */
+ virtual RoomMessagesJob* getMessages(Room* room,
+ const QString& from) const;
signals:
void resolved();
void connected();