forked from qt-creator/qt-creator
QmlProfiler: Always use quint16 for port number
Change-Id: Ie77227058637c4900248eaca0ea183ad46b82663 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -49,7 +49,7 @@ public:
|
|||||||
virtual void start() = 0;
|
virtual void start() = 0;
|
||||||
virtual void stop() = 0;
|
virtual void stop() = 0;
|
||||||
|
|
||||||
virtual int debugPort() const = 0;
|
virtual quint16 debugPort() const = 0;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void started();
|
void started();
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void CodaQmlProfilerRunner::appendMessage(ProjectExplorer::RunControl *, const Q
|
|||||||
emit appendMessage(message, format);
|
emit appendMessage(message, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
int QmlProfiler::Internal::CodaQmlProfilerRunner::debugPort() const
|
quint16 QmlProfiler::Internal::CodaQmlProfilerRunner::debugPort() const
|
||||||
{
|
{
|
||||||
return m_configuration->debuggerAspect()->qmlDebugServerPort();
|
return m_configuration->debuggerAspect()->qmlDebugServerPort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
// AbstractQmlProfilerRunner
|
// AbstractQmlProfilerRunner
|
||||||
virtual void start();
|
virtual void start();
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual int debugPort() const;
|
virtual quint16 debugPort() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void appendMessage(ProjectExplorer::RunControl *, const QString &message,
|
void appendMessage(ProjectExplorer::RunControl *, const QString &message,
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void LocalQmlProfilerRunner::stop()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int LocalQmlProfilerRunner::debugPort() const
|
quint16 LocalQmlProfilerRunner::debugPort() const
|
||||||
{
|
{
|
||||||
return m_configuration.port;
|
return m_configuration.port;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
// AbstractQmlProfilerRunner
|
// AbstractQmlProfilerRunner
|
||||||
virtual void start();
|
virtual void start();
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual int debugPort() const;
|
virtual quint16 debugPort() const;
|
||||||
|
|
||||||
bool hasExecutable() const { return !m_configuration.executable.isEmpty(); }
|
bool hasExecutable() const { return !m_configuration.executable.isEmpty(); }
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
static void showNonmodalWarning(const QString &warningMsg);
|
static void showNonmodalWarning(const QString &warningMsg);
|
||||||
signals:
|
signals:
|
||||||
void processRunning(int port);
|
void processRunning(quint16 port);
|
||||||
void stopRecording();
|
void stopRecording();
|
||||||
void timeUpdate();
|
void timeUpdate();
|
||||||
void recordingChanged(bool recording);
|
void recordingChanged(bool recording);
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
|
|
||||||
ConnectMode m_connectMode;
|
ConnectMode m_connectMode;
|
||||||
QString m_tcpHost;
|
QString m_tcpHost;
|
||||||
quint64 m_tcpPort;
|
quint16 m_tcpPort;
|
||||||
QString m_ostDevice;
|
QString m_ostDevice;
|
||||||
QString m_sysroot;
|
QString m_sysroot;
|
||||||
QAction *m_saveQmlTrace;
|
QAction *m_saveQmlTrace;
|
||||||
@@ -364,7 +364,7 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
|
|||||||
d->m_projectFinder.setProjectFiles(sourceFiles);
|
d->m_projectFinder.setProjectFiles(sourceFiles);
|
||||||
d->m_projectFinder.setSysroot(sp.sysroot);
|
d->m_projectFinder.setSysroot(sp.sysroot);
|
||||||
|
|
||||||
connect(engine, SIGNAL(processRunning(int)), this, SLOT(connectClient(int)));
|
connect(engine, SIGNAL(processRunning(quint16)), this, SLOT(connectClient(quint16)));
|
||||||
connect(engine, SIGNAL(finished()), this, SLOT(disconnectClient()));
|
connect(engine, SIGNAL(finished()), this, SLOT(disconnectClient()));
|
||||||
connect(engine, SIGNAL(finished()), this, SLOT(updateTimers()));
|
connect(engine, SIGNAL(finished()), this, SLOT(updateTimers()));
|
||||||
connect(engine, SIGNAL(stopRecording()), this, SLOT(stopRecording()));
|
connect(engine, SIGNAL(stopRecording()), this, SLOT(stopRecording()));
|
||||||
@@ -531,7 +531,7 @@ QWidget *QmlProfilerTool::createWidgets()
|
|||||||
return toolbarWidget;
|
return toolbarWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProfilerTool::connectClient(int port)
|
void QmlProfilerTool::connectClient(quint16 port)
|
||||||
{
|
{
|
||||||
if (d->m_client)
|
if (d->m_client)
|
||||||
delete d->m_client;
|
delete d->m_client;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
void startTool(Analyzer::StartMode mode);
|
void startTool(Analyzer::StartMode mode);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void connectClient(int port);
|
void connectClient(quint16 port);
|
||||||
void disconnectClient();
|
void disconnectClient();
|
||||||
|
|
||||||
void startRecording();
|
void startRecording();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ using namespace RemoteLinux;
|
|||||||
RemoteLinuxQmlProfilerRunner::RemoteLinuxQmlProfilerRunner(
|
RemoteLinuxQmlProfilerRunner::RemoteLinuxQmlProfilerRunner(
|
||||||
RemoteLinuxRunConfiguration *runConfiguration, QObject *parent)
|
RemoteLinuxRunConfiguration *runConfiguration, QObject *parent)
|
||||||
: AbstractQmlProfilerRunner(parent)
|
: AbstractQmlProfilerRunner(parent)
|
||||||
, m_port(-1)
|
, m_port(0)
|
||||||
, m_runControl(0)
|
, m_runControl(0)
|
||||||
{
|
{
|
||||||
// find run control factory
|
// find run control factory
|
||||||
@@ -96,7 +96,7 @@ void RemoteLinuxQmlProfilerRunner::stop()
|
|||||||
runner()->stop();
|
runner()->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
int RemoteLinuxQmlProfilerRunner::debugPort() const
|
quint16 RemoteLinuxQmlProfilerRunner::debugPort() const
|
||||||
{
|
{
|
||||||
return m_port;
|
return m_port;
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ void RemoteLinuxQmlProfilerRunner::getPorts()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(runner(), return);
|
QTC_ASSERT(runner(), return);
|
||||||
m_port = runner()->freePorts()->getNext();
|
m_port = runner()->freePorts()->getNext();
|
||||||
if (m_port == -1) {
|
if (m_port == 0) {
|
||||||
emit appendMessage(tr("Not enough free ports on device for analyzing.\n"),
|
emit appendMessage(tr("Not enough free ports on device for analyzing.\n"),
|
||||||
Utils::ErrorMessageFormat);
|
Utils::ErrorMessageFormat);
|
||||||
runner()->stop();
|
runner()->stop();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public:
|
|||||||
// AbstractQmlProfilerRunner
|
// AbstractQmlProfilerRunner
|
||||||
virtual void start();
|
virtual void start();
|
||||||
virtual void stop();
|
virtual void stop();
|
||||||
virtual int debugPort() const;
|
virtual quint16 debugPort() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void getPorts();
|
void getPorts();
|
||||||
@@ -67,7 +67,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
RemoteLinux::AbstractRemoteLinuxApplicationRunner *runner() const;
|
RemoteLinux::AbstractRemoteLinuxApplicationRunner *runner() const;
|
||||||
|
|
||||||
int m_port;
|
quint16 m_port;
|
||||||
RemoteLinux::AbstractRemoteLinuxRunControl *m_runControl;
|
RemoteLinux::AbstractRemoteLinuxRunControl *m_runControl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user