Changeset View
Changeset View
Standalone View
Standalone View
src/avahi-remoteservice.cpp
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | |||||
152 | } | 152 | } | ||
153 | 153 | | |||
154 | void RemoteServicePrivate::gotFound(int, int, const QString &name, const QString &, const QString &domain, const QString &host, int, const QString &, ushort port, const QList<QByteArray> &txt, uint) | 154 | void RemoteServicePrivate::gotFound(int, int, const QString &name, const QString &, const QString &domain, const QString &host, int, const QString &, ushort port, const QList<QByteArray> &txt, uint) | ||
155 | { | 155 | { | ||
156 | m_serviceName = name; | 156 | m_serviceName = name; | ||
157 | m_hostName = host; | 157 | m_hostName = host; | ||
158 | m_port = port; | 158 | m_port = port; | ||
159 | m_domain = DNSToDomain(domain); | 159 | m_domain = DNSToDomain(domain); | ||
160 | Q_FOREACH (const QByteArray &x, txt) { | 160 | for (const QByteArray &x : txt) { | ||
161 | int pos = x.indexOf("="); | 161 | int pos = x.indexOf("="); | ||
162 | if (pos == -1) { | 162 | if (pos == -1) { | ||
163 | m_textData[x] = QByteArray(); | 163 | m_textData[x] = QByteArray(); | ||
164 | } else { | 164 | } else { | ||
165 | m_textData[x.mid(0, pos)] = x.mid(pos + 1, x.size() - pos); | 165 | m_textData[x.mid(0, pos)] = x.mid(pos + 1, x.size() - pos); | ||
166 | } | 166 | } | ||
167 | } | 167 | } | ||
168 | m_resolved = true; | 168 | m_resolved = true; | ||
Show All 22 Lines |