aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppClient.h
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2019-10-26 18:53:23 +0200
committerLNJ <lnj@kaidan.im>2019-10-27 11:26:23 +0100
commitf8c546c5b701c53d708a38a951fcc734eaee7940 (patch)
tree1c931fb34dfeb49d8a0a435bddf0dc6927c44f88 /src/client/QXmppClient.h
parent942b926b6e468524f410ceb8fc28ee28f60ad7ce (diff)
downloadqxmpp-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/QXmppClient.h')
-rw-r--r--src/client/QXmppClient.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/QXmppClient.h b/src/client/QXmppClient.h
index d3726334..91e9f11d 100644
--- a/src/client/QXmppClient.h
+++ b/src/client/QXmppClient.h
@@ -80,28 +80,27 @@ class QXmppVersionManager;
class QXMPP_EXPORT QXmppClient : public QXmppLoggable
{
Q_OBJECT
- Q_ENUMS(Error State)
Q_PROPERTY(QXmppLogger* logger READ logger WRITE setLogger NOTIFY loggerChanged)
Q_PROPERTY(State state READ state NOTIFY stateChanged)
public:
/// An enumeration for type of error.
/// Error could come due a TCP socket or XML stream or due to various stanzas.
- enum Error
- {
+ enum Error {
NoError, ///< No error.
SocketError, ///< Error due to TCP socket.
KeepAliveError, ///< Error due to no response to a keep alive.
XmppStreamError ///< Error due to XML stream.
};
+ Q_ENUM(Error)
/// This enumeration describes a client state.
- enum State
- {
+ enum State {
DisconnectedState, ///< Disconnected from the server.
ConnectingState, ///< Trying to connect to the server.
ConnectedState ///< Connected to the server.
};
+ Q_ENUM(State)
QXmppClient(QObject *parent = nullptr);
~QXmppClient() override;