sp.debuggee = rc->executable();
sp.debuggeeArgs = rc->commandLineArguments();
sp.displayName = rc->displayName();
+ sp.connParams.host = QLatin1String("localhost");
+ sp.connParams.port = rc->qmlDebugServerPort();
return sp;
}
m_process = new QProcess();
- QStringList arguments("-qmljsdebugger=port:" + QString::number(QmlProfilerTool::port) + ",block");
+ QStringList arguments("-qmljsdebugger=port:" + QString::number(m_params.connParams.port) + ",block");
arguments.append(m_params.debuggeeArgs.split(" "));
if (QmlProfilerPlugin::debugOutput)
}
if (QmlProfilerPlugin::debugOutput)
- qWarning("QmlProfiler: Connecting to %s:%d", qPrintable(QmlProfilerTool::host), QmlProfilerTool::port);
+ qWarning("QmlProfiler: Connecting to %s:%d", qPrintable(m_params.connParams.host), m_params.connParams.port);
return true;
}
using namespace Analyzer;
using namespace QmlProfiler::Internal;
-QString QmlProfilerTool::host = QLatin1String("localhost");
-quint16 QmlProfilerTool::port = 33456;
-
-
// Adapter for output pane.
class QmlProfilerOutputPaneAdapter : public Analyzer::IAnalyzerOutputPaneAdapter
{
QAction *m_attachAction;
QToolButton *m_recordButton;
bool m_recordingEnabled;
+ QString m_host;
+ quint64 m_port;
};
QmlProfilerTool::QmlProfilerTool(QObject *parent)
{
QmlProfilerEngine *engine = new QmlProfilerEngine(sp, runConfiguration);
+ d->m_host = sp.connParams.host;
+ d->m_port = sp.connParams.port;
+
d->m_runConfiguration = runConfiguration;
d->m_project = runConfiguration->target()->project();
if (d->m_project) {
delete d->m_client;
d->m_client = newClient;
- d->m_client->connectToHost(host, port);
+ d->m_client->connectToHost(d->m_host, d->m_port);
d->m_client->waitForConnected();
if (d->m_client->isConnected()) {
if (result == QDialog::Rejected)
return;
- port = dialog.port();
- host = dialog.address();
+ d->m_port = dialog.port();
+ d->m_host = dialog.address();
connectClient();
AnalyzerManager::instance()->showMode();