forked from qt-creator/qt-creator
Debugger: Use a QUrl for Qml server port and host
Host and port reasonably belong together, using a QUrl makes that more explicit and follows the lead of the Qml profiler in that area. Change-Id: I754cb17d165ce6b2f25c655eeebfd8ac8f5a93c7 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
@@ -384,7 +384,7 @@ void QmlEngine::beginConnection()
|
||||
|
||||
QObject::disconnect(d->startupMessageFilterConnection);
|
||||
|
||||
QString host = runParameters().qmlServer.host;
|
||||
QString host = runParameters().qmlServer.host();
|
||||
// Use localhost as default
|
||||
if (host.isEmpty())
|
||||
host = QHostAddress(QHostAddress::LocalHost).toString();
|
||||
@@ -401,12 +401,12 @@ void QmlEngine::beginConnection()
|
||||
* the connection will be closed again (instead of returning the "connection refused"
|
||||
* error that we expect).
|
||||
*/
|
||||
Utils::Port port = runParameters().qmlServer.port;
|
||||
int port = runParameters().qmlServer.port();
|
||||
|
||||
if (!d->connection || d->connection->isConnected())
|
||||
return;
|
||||
|
||||
d->connection->connectToHost(host, port.number());
|
||||
d->connection->connectToHost(host, port);
|
||||
|
||||
//A timeout to check the connection state
|
||||
d->connectionTimer.start();
|
||||
|
||||
Reference in New Issue
Block a user