Commit a4215384 authored by Thiago Macieira's avatar Thiago Macieira

Fix bad use of port numbers.

-1 is not a valid quint16 number. It gets converted to 65535, which is
a valid port number. So, instead, use port number 0 which isn't valid
(if you try to bind to it, the OS chooses a port for you).

Found by ICC
src/plugins/android/androidrunner.cpp(150): warning #68: integer conversion resulted in a change of sign

Change-Id: I7de033f80b0e4431b7f1ffff13fc4e4f0f7af445
Reviewed-by: default avatarBogDan Vatra <>
parent dc8dab3d
......@@ -147,7 +147,7 @@ AndroidRunner::AndroidRunner(QObject *parent,
qDebug() << tr("No free ports available on host for QML debugging."));
m_qmlPort = server.serverPort();
} else {
m_qmlPort = -1;
m_qmlPort = 0;
ProjectExplorer::Target *target = runConfig->target();
m_useLocalQtLibs = AndroidManager::useLocalLibs(target);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment