forked from qt-creator/qt-creator
Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port. Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "iostoolhandler.h"
|
||||
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <utils/port.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QMapIterator>
|
||||
@@ -171,7 +172,7 @@ QVariantMap IosSimulator::toMap() const
|
||||
return res;
|
||||
}
|
||||
|
||||
quint16 IosSimulator::nextPort() const
|
||||
Utils::Port IosSimulator::nextPort() const
|
||||
{
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
// use qrand instead?
|
||||
@@ -192,7 +193,7 @@ quint16 IosSimulator::nextPort() const
|
||||
|| portVerifier.exitCode() != 0)
|
||||
break;
|
||||
}
|
||||
return m_lastPort;
|
||||
return Utils::Port(m_lastPort);
|
||||
}
|
||||
|
||||
bool IosSimulator::canAutoDetectPorts() const
|
||||
|
||||
Reference in New Issue
Block a user