Update QtZeroconf
parent
ca682fc61f
commit
bfab7d7c87
|
|
@ -1 +1 @@
|
|||
Subproject commit 39efbe2879d93bd483ee1f14fc94281a03b49935
|
||||
Subproject commit cbf4f2bf7b926b9a874af013efbf0f6dde3155e9
|
||||
|
|
@ -260,14 +260,18 @@ void UpnpDiscovery::networkReplyFinished(QNetworkReply *reply)
|
|||
device->setName(name);
|
||||
device->setVersion(version);
|
||||
foreach (const QUrl &url, connections) {
|
||||
if (!device->connections()->find(url)) {
|
||||
Connection *connection = device->connections()->find(url);
|
||||
if (!connection) {
|
||||
qDebug() << "UPnP: Adding new connection to host:" << device->name() << url;
|
||||
bool sslEnabled = url.scheme() == "nymeas" || url.scheme() == "wss";
|
||||
QString displayName = QString("%1:%2").arg(url.host()).arg(url.port());
|
||||
Connection::BearerType bearerType = QHostAddress(url.host()).isLoopback() ? Connection::BearerTypeLoopback : Connection::BearerTypeLan;
|
||||
Connection *conn = new Connection(url, bearerType, sslEnabled, displayName);
|
||||
conn->setOnline(true);
|
||||
device->connections()->addConnection(conn);
|
||||
connection = new Connection(url, bearerType, sslEnabled, displayName);
|
||||
connection->setOnline(true);
|
||||
device->connections()->addConnection(connection);
|
||||
} else {
|
||||
qDebug() << "UPnP: Setting connection online:" << device->name() << url.toString();
|
||||
connection->setOnline(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,14 +153,14 @@ void ZeroconfDiscovery::serviceEntryAdded(const QZeroConfService &entry)
|
|||
url.setPort(entry->port());
|
||||
Connection *connection = host->connections()->find(url);
|
||||
if (!connection) {
|
||||
// qDebug() << "Zeroconf: Adding new connection to host:" << host->name() << url.toString();
|
||||
qDebug() << "Zeroconf: Adding new connection to host:" << host->name() << url.toString();
|
||||
QString displayName = QString("%1:%2").arg(url.host()).arg(url.port());
|
||||
Connection::BearerType bearerType = QHostAddress(url.host()).isLoopback() ? Connection::BearerTypeLoopback : Connection::BearerTypeLan;
|
||||
connection = new Connection(url, bearerType, sslEnabled, displayName);
|
||||
connection->setOnline(true);
|
||||
host->connections()->addConnection(connection);
|
||||
} else {
|
||||
// qDebug() << "Zeroconf: Setting connection online:" << host->name() << url.toString();
|
||||
qDebug() << "Zeroconf: Setting connection online:" << host->name() << url.toString();
|
||||
connection->setOnline(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ void ZeroconfDiscovery::serviceEntryRemoved(const QZeroConfService &entry)
|
|||
return;
|
||||
}
|
||||
|
||||
// qDebug() << "Zeroconf: Setting connection offline:" << host->name() << url.toString();
|
||||
qDebug() << "Zeroconf: Setting connection offline:" << host->name() << url.toString();
|
||||
connection->setOnline(false);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ Item {
|
|||
property var engine: mainRepeater.itemAt(index)._engine
|
||||
property string serverName: engine.nymeaConfiguration.serverName
|
||||
Material.elevation: index
|
||||
width: Math.max(150, tabbar.width / tabbar.count)
|
||||
width: Math.max(150, tabbar.width / tabModel.count)
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
Loading…
Reference in New Issue