QtNetwork: use Q_ENUM instead of Q_ENUMS
Change-Id: I531191fae910354abd2e5ceb7c8ecf0519ccad97 Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
This commit is contained in:
parent
b4bcc50c32
commit
ba7cedb058
@ -55,7 +55,6 @@ class QNetworkReplyPrivate;
|
||||
class Q_NETWORK_EXPORT QNetworkReply: public QIODevice
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(NetworkError)
|
||||
public:
|
||||
enum NetworkError {
|
||||
NoError = 0,
|
||||
@ -101,6 +100,7 @@ public:
|
||||
ServiceUnavailableError,
|
||||
UnknownServerError = 499
|
||||
};
|
||||
Q_ENUM(NetworkError)
|
||||
|
||||
~QNetworkReply();
|
||||
|
||||
|
@ -167,7 +167,6 @@ Q_DECLARE_SHARED(QDnsTextRecord)
|
||||
class Q_NETWORK_EXPORT QDnsLookup : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(Error Type)
|
||||
Q_PROPERTY(Error error READ error NOTIFY finished)
|
||||
Q_PROPERTY(QString errorString READ errorString NOTIFY finished)
|
||||
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
|
||||
@ -186,6 +185,7 @@ public:
|
||||
ServerRefusedError,
|
||||
NotFoundError
|
||||
};
|
||||
Q_ENUM(Error)
|
||||
|
||||
enum Type
|
||||
{
|
||||
@ -199,6 +199,7 @@ public:
|
||||
SRV = 33,
|
||||
TXT = 16
|
||||
};
|
||||
Q_ENUM(Type)
|
||||
|
||||
explicit QDnsLookup(QObject *parent = 0);
|
||||
QDnsLookup(Type type, const QString &name, QObject *parent = 0);
|
||||
|
@ -53,19 +53,20 @@ class QAuthenticator;
|
||||
class Q_NETWORK_EXPORT QAbstractSocket : public QIODevice
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(SocketType NetworkLayerProtocol SocketError SocketState SocketOption)
|
||||
public:
|
||||
enum SocketType {
|
||||
TcpSocket,
|
||||
UdpSocket,
|
||||
UnknownSocketType = -1
|
||||
};
|
||||
Q_ENUM(SocketType)
|
||||
enum NetworkLayerProtocol {
|
||||
IPv4Protocol,
|
||||
IPv6Protocol,
|
||||
AnyIPProtocol,
|
||||
UnknownNetworkLayerProtocol = -1
|
||||
};
|
||||
Q_ENUM(NetworkLayerProtocol)
|
||||
enum SocketError {
|
||||
ConnectionRefusedError,
|
||||
RemoteHostClosedError,
|
||||
@ -93,6 +94,7 @@ public:
|
||||
|
||||
UnknownSocketError = -1
|
||||
};
|
||||
Q_ENUM(SocketError)
|
||||
enum SocketState {
|
||||
UnconnectedState,
|
||||
HostLookupState,
|
||||
@ -102,6 +104,7 @@ public:
|
||||
ListeningState,
|
||||
ClosingState
|
||||
};
|
||||
Q_ENUM(SocketState)
|
||||
enum SocketOption {
|
||||
LowDelayOption, // TCP_NODELAY
|
||||
KeepAliveOption, // SO_KEEPALIVE
|
||||
@ -111,6 +114,7 @@ public:
|
||||
SendBufferSizeSocketOption, //SO_SNDBUF
|
||||
ReceiveBufferSizeSocketOption //SO_RCVBUF
|
||||
};
|
||||
Q_ENUM(SocketOption)
|
||||
enum BindFlag {
|
||||
DefaultForPlatform = 0x0,
|
||||
ShareAddress = 0x1,
|
||||
|
Loading…
Reference in New Issue
Block a user