From 5073d2d83ddf25c5d945c53fecea338a31fa257c Mon Sep 17 00:00:00 2001 From: Jonathan Bagg Date: Sun, 5 Nov 2017 13:00:19 -0500 Subject: [PATCH] Make QZeroConfService's setter functions private --- qzeroconfservice.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/qzeroconfservice.h b/qzeroconfservice.h index 0cd2677..04fe906 100644 --- a/qzeroconfservice.h +++ b/qzeroconfservice.h @@ -6,6 +6,7 @@ #include "qzeroconfglobal.h" class QZeroConfServiceData; +class QZeroConfPrivate; class Q_ZEROCONF_EXPORT QZeroConfService { @@ -15,6 +16,8 @@ class Q_ZEROCONF_EXPORT QZeroConfService Q_PROPERTY( QString domain READ domain ) Q_PROPERTY( QString host READ host ) +friend class QZeroConfPrivate; + public: QZeroConfService(); @@ -22,31 +25,30 @@ public: 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 = ""); bool isValid() const; bool operator==(const QZeroConfService &rhs) const; private: + void setName(const QString &name); + void setType(const QString &type); + void setDomain(const QString &domain); + void setHost(const QString &host); + void setIp(QHostAddress &ip); + void setIpv6(const QHostAddress &ipv6); + void setInterfaceIndex(const quint32 &interfaceIndex); + void setPort(const quint16 port); + void setTxt(const QMap txt); + void appendTxt(QByteArray idx, QByteArray val = ""); QExplicitlySharedDataPointer data; };