Added debug operator<< to QZeroConfService

Signed-off-by: Jonathan Bagg <drwho@infidigm.net>
This commit is contained in:
Matthias Kollmann
2017-11-02 14:12:21 -04:00
committed by Jonathan Bagg
parent 802572f50f
commit 6c9553bd5e
4 changed files with 19 additions and 0 deletions

View File

@@ -142,3 +142,10 @@ bool QZeroConfService::operator==(const QZeroConfService &rhs) const
{
return this->name() == rhs.name() && (this->ip() == rhs.ip() || this->ipv6() == rhs.ipv6());
}
QDebug operator<<(QDebug debug, const QZeroConfService &service)
{
QDebugStateSaver saver(debug);
debug.nospace() << "Zeroconf Service: " + service.name() + " @ " + service.host() + " ("+ service.ip().toString() + ":" + QString::number( service.port()) + ")";
return debug.maybeSpace();
}