forked from qt-creator/qt-creator
Analyzer: Replace StartMode with a useStartupProject boolean
This is what it is on the top level. The change makes it obvious that in the valgrind(-derived) plugins the value is later wrongly used to make a decision on whether to run the valgrind process locally or remotely. But that's isolated in valgrind now and can be fixed there. Change-Id: I6fa5e669dec1f9e2cdebe42a1591d15144082a21 Reviewed-by: Anton Kreuzkamp <anton.kreuzkamp@kdab.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -119,7 +119,7 @@ LocalQmlProfilerRunner::~LocalQmlProfilerRunner()
|
||||
|
||||
void LocalQmlProfilerRunner::start()
|
||||
{
|
||||
if (m_engine->mode() != Analyzer::StartLocal)
|
||||
if (!m_engine->startParameters().useStartupProject)
|
||||
return;
|
||||
|
||||
QString arguments = QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(m_configuration.port);
|
||||
@@ -157,7 +157,7 @@ void LocalQmlProfilerRunner::spontaneousStop(int exitCode, QProcess::ExitStatus
|
||||
|
||||
void LocalQmlProfilerRunner::stop()
|
||||
{
|
||||
if (m_engine->mode() != Analyzer::StartLocal)
|
||||
if (!m_engine->startParameters().useStartupProject)
|
||||
return;
|
||||
|
||||
if (QmlProfilerPlugin::debugOutput)
|
||||
|
||||
@@ -113,7 +113,7 @@ bool QmlProfilerRunControl::startEngine()
|
||||
|
||||
d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppStarting);
|
||||
|
||||
if (startParameters().startMode == StartLocal)
|
||||
if (startParameters().useStartupProject)
|
||||
d->m_noDebugOutputTimer.start();
|
||||
else if (startParameters().analyzerPort != 0)
|
||||
emit processRunning(startParameters().analyzerPort);
|
||||
|
||||
@@ -74,7 +74,6 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
|
||||
action->setText(tr("QML Profiler"));
|
||||
action->setToolTip(description);
|
||||
action->setStartMode(StartLocal);
|
||||
action->setMenuGroup(Constants::G_ANALYZER_TOOLS);
|
||||
AnalyzerManager::addAction(action);
|
||||
|
||||
@@ -87,7 +86,7 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
action->setRunMode(ProjectExplorer::QmlProfilerRunMode);
|
||||
action->setText(tr("QML Profiler (External)"));
|
||||
action->setToolTip(description);
|
||||
action->setStartMode(StartRemote);
|
||||
action->setUseSpecialStart();
|
||||
action->setMenuGroup(Constants::G_ANALYZER_REMOTE_TOOLS);
|
||||
AnalyzerManager::addAction(action);
|
||||
|
||||
|
||||
@@ -83,8 +83,6 @@ static AnalyzerStartParameters createQmlProfilerStartParameters(RunConfiguration
|
||||
if (localPort == 0)
|
||||
return sp;
|
||||
sp.analyzerPort = localPort;
|
||||
|
||||
sp.startMode = StartLocal;
|
||||
return sp;
|
||||
}
|
||||
|
||||
|
||||
@@ -484,7 +484,7 @@ void QmlProfilerTool::startRemoteTool()
|
||||
}
|
||||
|
||||
AnalyzerStartParameters sp;
|
||||
sp.startMode = StartRemote;
|
||||
sp.useStartupProject = false;
|
||||
|
||||
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
|
||||
if (device) {
|
||||
|
||||
Reference in New Issue
Block a user