From defbad696b924835de9bb8b16e0055a6cc983566 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Wed, 22 Nov 2017 14:34:40 +0900 Subject: 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). --- connection.h | 42 +++++++++++++++++++++--------------------- 1 file 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, Room*> roomMap() const; - // Old API that will be abolished any time soon. DO NOT USE. - - /** @deprecated Use callApi() or Room::postMessage() instead */ - Q_INVOKABLE virtual void postMessage(Room* room, const QString& type, - const QString& message) const; - /** @deprecated Use callApi() or Room::postReceipt() instead */ - Q_INVOKABLE virtual PostReceiptJob* postReceipt(Room* room, - RoomEvent* event) const; - /** @deprecated Use callApi() instead */ - Q_INVOKABLE virtual JoinRoomJob* joinRoom(const QString& roomAlias); - /** @deprecated Use callApi() or Room::leaveRoom() instead */ - Q_INVOKABLE virtual void leaveRoom( Room* room ); - /** @deprecated User callApi() or Room::getPreviousContent() instead */ - Q_INVOKABLE virtual RoomMessagesJob* getMessages(Room* room, - const QString& from) const; - /** @deprecated Use callApi() instead */ - virtual MediaThumbnailJob* getThumbnail(const QUrl& url, - QSize requestedSize) const; - /** @deprecated Use callApi() 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() or Room::postMessage() instead */ + virtual void postMessage(Room* room, const QString& type, + const QString& message) const; + /** @deprecated Use callApi() or Room::postReceipt() instead */ + virtual PostReceiptJob* postReceipt(Room* room, + RoomEvent* event) const; + /** @deprecated Use callApi() instead */ + virtual JoinRoomJob* joinRoom(const QString& roomAlias); + /** @deprecated Use callApi() or Room::leaveRoom() instead */ + virtual void leaveRoom( Room* room ); + /** @deprecated User callApi() or Room::getPreviousContent() instead */ + virtual RoomMessagesJob* getMessages(Room* room, + const QString& from) const; signals: void resolved(); void connected(); -- cgit v1.2.3