diff options
| author | Linus Jahn <lnj@kaidan.im> | 2019-10-26 18:53:23 +0200 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-10-27 11:26:23 +0100 |
| commit | f8c546c5b701c53d708a38a951fcc734eaee7940 (patch) | |
| tree | 1c931fb34dfeb49d8a0a435bddf0dc6927c44f88 /src/client/QXmppTransferManager.h | |
| parent | 942b926b6e468524f410ceb8fc28ee28f60ad7ce (diff) | |
| download | qxmpp-f8c546c5b701c53d708a38a951fcc734eaee7940.tar.gz | |
Replace deprecated Q_ENUMS with Q_ENUM
Q_ENUM exists since Qt 5.5, more details can be found here:
https://woboq.com/blog/q_enum.html
Diffstat (limited to 'src/client/QXmppTransferManager.h')
| -rw-r--r-- | src/client/QXmppTransferManager.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/client/QXmppTransferManager.h b/src/client/QXmppTransferManager.h index 8202ea91..9a263772 100644 --- a/src/client/QXmppTransferManager.h +++ b/src/client/QXmppTransferManager.h @@ -86,7 +86,6 @@ private: class QXMPP_EXPORT QXmppTransferJob : public QXmppLoggable { Q_OBJECT - Q_ENUMS(Direction Error State) Q_FLAGS(Method Methods) Q_PROPERTY(Direction direction READ direction CONSTANT) Q_PROPERTY(QUrl localFileUrl READ localFileUrl WRITE setLocalFileUrl NOTIFY localFileUrlChanged) @@ -99,30 +98,30 @@ class QXMPP_EXPORT QXmppTransferJob : public QXmppLoggable public: /// This enum is used to describe the direction of a transfer job. - enum Direction - { + enum Direction { IncomingDirection, ///< The file is being received. OutgoingDirection ///< The file is being sent. }; + Q_ENUM(Direction) /// This enum is used to describe the type of error encountered by a transfer job. - enum Error - { + enum Error { NoError = 0, ///< No error occurred. AbortError, ///< The file transfer was aborted. FileAccessError, ///< An error was encountered trying to access a local file. FileCorruptError, ///< The file is corrupt: the file size or hash do not match. ProtocolError ///< An error was encountered in the file transfer protocol. }; + Q_ENUM(Error) /// This enum is used to describe a transfer method. - enum Method - { + enum Method { NoMethod = 0, ///< No transfer method. InBandMethod = 1, ///< XEP-0047: In-Band Bytestreams SocksMethod = 2, ///< XEP-0065: SOCKS5 Bytestreams AnyMethod = 3 ///< Any supported transfer method. }; + Q_ENUM(Method) Q_DECLARE_FLAGS(Methods, Method) /// This enum is used to describe the state of a transfer job. @@ -133,6 +132,7 @@ public: TransferState = 2, ///< The transfer is ongoing. FinishedState = 3 ///< The transfer is finished. }; + Q_ENUM(State) ~QXmppTransferJob() override; |
