From bf2f5b8742abba5405134c9a6211204398fabb14 Mon Sep 17 00:00:00 2001 From: Jonathan Bagg Date: Tue, 31 Oct 2017 20:07:07 -0400 Subject: [PATCH] fix indentations in QZeroConfService --- qzeroconfservice.cpp | 67 ++++++++++++++++++++++---------------------- qzeroconfservice.h | 62 ++++++++++++++++++++-------------------- 2 files changed, 64 insertions(+), 65 deletions(-) diff --git a/qzeroconfservice.cpp b/qzeroconfservice.cpp index f02d691..1a9df45 100644 --- a/qzeroconfservice.cpp +++ b/qzeroconfservice.cpp @@ -4,15 +4,15 @@ class QZeroConfServiceData : public QSharedData { public: - QString name; - QString type; - QString domain; - QString host; - QHostAddress ip; - QHostAddress ipv6; - quint32 interfaceIndex; - quint16 port = 0; - QMap txt; + QString name; + QString type; + QString domain; + QString host; + QHostAddress ip; + QHostAddress ipv6; + quint32 interfaceIndex; + quint16 port = 0; + QMap txt; }; @@ -28,9 +28,9 @@ QZeroConfService::QZeroConfService(const QZeroConfService &rhs) : data(rhs.data) QZeroConfService &QZeroConfService::operator=(const QZeroConfService &rhs) { - if (this != &rhs) - data.operator=(rhs.data); - return *this; + if (this != &rhs) + data.operator=(rhs.data); + return *this; } QZeroConfService::~QZeroConfService() @@ -40,106 +40,105 @@ QZeroConfService::~QZeroConfService() QString QZeroConfService::name() const { - return data->name; + return data->name; } void QZeroConfService::setName(const QString &name) { - data->name = name; + data->name = name; } QString QZeroConfService::type() const { - return data->type; + return data->type; } void QZeroConfService::setType(const QString &type) { - data->type = type; + data->type = type; } QString QZeroConfService::domain() const { - return data->domain; + return data->domain; } void QZeroConfService::setDomain(const QString &domain) { - data->domain = domain; + data->domain = domain; } QString QZeroConfService::host() const { - return data->host; + return data->host; } void QZeroConfService::setHost(const QString &host) { - data->host = host; + data->host = host; } QHostAddress QZeroConfService::ip() const { - return data->ip; + return data->ip; } void QZeroConfService::setIp(QHostAddress &ip) { - data->ip = ip; + data->ip = ip; } QHostAddress QZeroConfService::ipv6() const { - return data->ipv6; + return data->ipv6; } void QZeroConfService::setIpv6(const QHostAddress &ipv6) { - data->ipv6 = ipv6; + data->ipv6 = ipv6; } quint32 QZeroConfService::interfaceIndex() const { - return data->interfaceIndex; + return data->interfaceIndex; } void QZeroConfService::setInterfaceIndex(const quint32 &interfaceIndex) { - data->interfaceIndex = interfaceIndex; + data->interfaceIndex = interfaceIndex; } quint16 QZeroConfService::port() const { - return data->port; + return data->port; } void QZeroConfService::setPort(const quint16 port) { - data->port = port; + data->port = port; } QMap QZeroConfService::txt() const { - return data->txt; + return data->txt; } void QZeroConfService::setTxt(const QMap txt) { - data->txt = txt; + data->txt = txt; } void QZeroConfService::appendTxt(QByteArray idx, QByteArray val) { - data->txt[idx] = val; + data->txt[idx] = val; } bool QZeroConfService::isValid() const { - - return (!data->name.isEmpty()); + return (!data->name.isEmpty()); } bool QZeroConfService::operator==(const QZeroConfService &rhs) const { - return this->name() == rhs.name() && (this->ip() == rhs.ip() || this->ipv6() == rhs.ipv6()); + return this->name() == rhs.name() && (this->ip() == rhs.ip() || this->ipv6() == rhs.ipv6()); } diff --git a/qzeroconfservice.h b/qzeroconfservice.h index 853ba31..b388fd0 100644 --- a/qzeroconfservice.h +++ b/qzeroconfservice.h @@ -8,45 +8,45 @@ class QZeroConfServiceData; class QZeroConfService { - Q_GADGET - Q_PROPERTY( QString name READ name ) - Q_PROPERTY( QString type READ type ) - Q_PROPERTY( QString domain READ domain ) - Q_PROPERTY( QString host READ host ) + Q_GADGET + Q_PROPERTY( QString name READ name ) + Q_PROPERTY( QString type READ type ) + Q_PROPERTY( QString domain READ domain ) + Q_PROPERTY( QString host READ host ) public: - QZeroConfService(); - QZeroConfService(const QZeroConfService &); - QZeroConfService &operator=(const QZeroConfService &); - ~QZeroConfService(); + QZeroConfService(); + QZeroConfService(const QZeroConfService &); + QZeroConfService &operator=(const QZeroConfService &); + ~QZeroConfService(); - QString name() const; - void setName(const QString &name); - QString type() const; - void setType(const QString &type); - QString domain() const; - void setDomain(const QString &domain); - QString host() const; - void setHost(const QString &host); - QHostAddress ip() const; - void setIp(QHostAddress &ip); - QHostAddress ipv6() const; - void setIpv6(const QHostAddress &ipv6); - quint32 interfaceIndex() const; - void setInterfaceIndex(const quint32 &interfaceIndex); - quint16 port() const; - void setPort(const quint16 port); - QMap txt() const; - void setTxt(const QMap txt); - void appendTxt(QByteArray idx, QByteArray val = ""); + QString name() const; + void setName(const QString &name); + QString type() const; + void setType(const QString &type); + QString domain() const; + void setDomain(const QString &domain); + QString host() const; + void setHost(const QString &host); + QHostAddress ip() const; + void setIp(QHostAddress &ip); + QHostAddress ipv6() const; + void setIpv6(const QHostAddress &ipv6); + quint32 interfaceIndex() const; + void setInterfaceIndex(const quint32 &interfaceIndex); + quint16 port() const; + void setPort(const quint16 port); + QMap txt() const; + void setTxt(const QMap txt); + void appendTxt(QByteArray idx, QByteArray val = ""); - bool isValid() const; - bool operator==(const QZeroConfService &rhs) const; + bool isValid() const; + bool operator==(const QZeroConfService &rhs) const; private: - QSharedDataPointer data; + QSharedDataPointer data; }; Q_DECLARE_METATYPE(QZeroConfService)