diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-09-11 13:05:40 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-09-11 13:05:40 +0200 |
commit | 6597866ead7a3eb03cfcbbd99b547de1bb72867e (patch) | |
tree | be13b1876e5bbd04ae32cf85d4b063c2f628e009 /lib/mxcreply.h | |
parent | 4babd9b2f1ba1d8c8c58c2f728cc4875ecf144c7 (diff) | |
download | libquotient-6597866ead7a3eb03cfcbbd99b547de1bb72867e.tar.gz libquotient-6597866ead7a3eb03cfcbbd99b547de1bb72867e.zip |
Further tweaks to MxcReply
- QNetworkReply::isSequential() already returns `true`, there's no need
to overload it again.
- Use `Q_SLOTS` instead of `slots` because it's an external library
interface and clients may use other libraries using `slots` identifier;
- Use `emit` instead of `Q_EMIT` because this is a part of internal
implementation and if we ever use a library that has an `emit`
identifier, a massive search-replace will be in order anyway.
- Use `QMetaObject::invokeMethod()` with a queued connection as
a clearer way to achieve the same goal as `QTimer::singleShot(0, ...)`.
Diffstat (limited to 'lib/mxcreply.h')
-rw-r--r-- | lib/mxcreply.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/mxcreply.h b/lib/mxcreply.h index ac3ac4f4..efaf01c6 100644 --- a/lib/mxcreply.h +++ b/lib/mxcreply.h @@ -8,23 +8,22 @@ namespace Quotient { class Room; -class Connection; + class MxcReply : public QNetworkReply { public: - MxcReply(QNetworkReply* reply, Room* room, const QString &eventId); - MxcReply(QNetworkReply* reply); - MxcReply(); - - bool isSequential() const override; + explicit MxcReply(); + explicit MxcReply(QNetworkReply *reply); + MxcReply(QNetworkReply* reply, Room* room, const QString& eventId); -public slots: +public Q_SLOTS: void abort() override; protected: qint64 readData(char *data, qint64 maxSize) override; + private: class Private; std::unique_ptr<Private> d; }; -}
\ No newline at end of file +} |