aboutsummaryrefslogtreecommitdiff
path: root/src/base
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/base
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/base')
-rw-r--r--src/base/QXmppIq.h3
-rw-r--r--src/base/QXmppLogger.h2
-rw-r--r--src/base/QXmppRtpChannel.h2
-rw-r--r--src/base/QXmppStun.h5
4 files changed, 5 insertions, 7 deletions
diff --git a/src/base/QXmppIq.h b/src/base/QXmppIq.h
index e7451e7c..d0bcc56f 100644
--- a/src/base/QXmppIq.h
+++ b/src/base/QXmppIq.h
@@ -43,8 +43,7 @@ class QXMPP_EXPORT QXmppIq : public QXmppStanza
{
public:
/// This enum describes the type of IQ.
- enum Type
- {
+ enum Type {
Error = 0, ///< Error response.
Get, ///< Get request.
Set, ///< Set request.
diff --git a/src/base/QXmppLogger.h b/src/base/QXmppLogger.h
index 912dbd4c..80b9a221 100644
--- a/src/base/QXmppLogger.h
+++ b/src/base/QXmppLogger.h
@@ -45,7 +45,6 @@ class QXmppLoggerPrivate;
class QXMPP_EXPORT QXmppLogger : public QObject
{
Q_OBJECT
- Q_ENUMS(LoggingType)
Q_FLAGS(MessageType MessageTypes)
Q_PROPERTY(QString logFilePath READ logFilePath WRITE setLogFilePath)
Q_PROPERTY(LoggingType loggingType READ loggingType WRITE setLoggingType)
@@ -60,6 +59,7 @@ public:
StdoutLogging = 2, ///< Log messages are written to the standard output
SignalLogging = 4 ///< Log messages are emitted as a signal
};
+ Q_ENUM(LoggingType)
/// This enum describes a type of log message.
enum MessageType
diff --git a/src/base/QXmppRtpChannel.h b/src/base/QXmppRtpChannel.h
index 9b68c7bc..4e7b353f 100644
--- a/src/base/QXmppRtpChannel.h
+++ b/src/base/QXmppRtpChannel.h
@@ -75,7 +75,6 @@ private:
class QXMPP_EXPORT QXmppRtpAudioChannel : public QIODevice, public QXmppRtpChannel
{
Q_OBJECT
- Q_ENUMS(Tone)
public:
/// This enum is used to describe a DTMF tone.
@@ -97,6 +96,7 @@ public:
Tone_C, ///< Tone for the C key.
Tone_D ///< Tone for the D key.
};
+ Q_ENUM(Tone)
QXmppRtpAudioChannel(QObject *parent = nullptr);
~QXmppRtpAudioChannel() override;
diff --git a/src/base/QXmppStun.h b/src/base/QXmppStun.h
index 4fa3e34b..deabdcb1 100644
--- a/src/base/QXmppStun.h
+++ b/src/base/QXmppStun.h
@@ -241,16 +241,15 @@ private:
class QXMPP_EXPORT QXmppIceConnection : public QXmppLoggable
{
Q_OBJECT
- Q_ENUMS(GatheringState)
Q_PROPERTY(QXmppIceConnection::GatheringState gatheringState READ gatheringState NOTIFY gatheringStateChanged)
public:
- enum GatheringState
- {
+ enum GatheringState {
NewGatheringState,
BusyGatheringState,
CompleteGatheringState
};
+ Q_ENUM(GatheringState)
QXmppIceConnection(QObject *parent = nullptr);
~QXmppIceConnection() override;