made QZeroConfService compareable

This commit is contained in:
Matthias Kollmann committed 2017-10-16 17:06:05 +02:00
1 parent 96bf0884bd
commit 3ec3630048
2 files changed
+6

No files matched your search

+5
View File
@@ -139,4 +139,9 @@ bool QZeroConfService::isValid() const
return (!data->name.isEmpty()) && (data->port > 0);
}
bool QZeroConfService::operator==(const QZeroConfService &rhs) const
{
return this->name() == rhs.name() && this->ip() == rhs.ip() && this->ipv6() == rhs.ipv6();
}
+1
View File
@@ -36,6 +36,7 @@ public:
void appendTxt(QByteArray idx, QByteArray val = "");
bool isValid() const;
bool operator==(const QZeroConfService &rhs) const;
private:
QSharedDataPointer<QZeroConfServiceData> data;