forked from qt-creator/qt-creator
Limit scope of uses of RunControl::runConfiguration()
Change-Id: Iccd9c0ce869060367db606b3c338bf21b2299548 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -122,10 +122,8 @@ void BareMetalDebugSupport::start()
|
|||||||
|
|
||||||
Runnable inferior;
|
Runnable inferior;
|
||||||
inferior.executable = bin;
|
inferior.executable = bin;
|
||||||
if (auto aspect = runControl()->aspect<ArgumentsAspect>()) {
|
if (auto aspect = runControl()->aspect<ArgumentsAspect>())
|
||||||
const auto rc = runControl()->runConfiguration();
|
inferior.commandLineArguments = aspect->arguments(runControl()->macroExpander());
|
||||||
inferior.commandLineArguments = aspect->arguments(rc->macroExpander());
|
|
||||||
}
|
|
||||||
setInferior(inferior);
|
setInferior(inferior);
|
||||||
setSymbolFile(bin);
|
setSymbolFile(bin);
|
||||||
setStartMode(AttachToRemoteServer);
|
setStartMode(AttachToRemoteServer);
|
||||||
|
@@ -74,14 +74,14 @@ QmlPreviewRunner::QmlPreviewRunner(ProjectExplorer::RunControl *runControl,
|
|||||||
});
|
});
|
||||||
|
|
||||||
connect(m_connectionManager.data(), &Internal::QmlPreviewConnectionManager::restart,
|
connect(m_connectionManager.data(), &Internal::QmlPreviewConnectionManager::restart,
|
||||||
runControl, [runControl, this]() {
|
runControl, [runControl]() {
|
||||||
if (!runControl->isRunning())
|
if (!runControl->isRunning())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ProjectExplorer::RunConfiguration *runConfig = runControl->runConfiguration();
|
connect(runControl, &ProjectExplorer::RunControl::stopped, runControl, [runControl]() {
|
||||||
connect(runControl, &ProjectExplorer::RunControl::stopped, runConfig, [runConfig](){
|
|
||||||
ProjectExplorer::ProjectExplorerPlugin::runRunConfiguration(
|
ProjectExplorer::ProjectExplorerPlugin::runRunConfiguration(
|
||||||
runConfig, ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE, true);
|
runControl->runConfiguration(),
|
||||||
|
ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
runControl->initiateStop();
|
runControl->initiateStop();
|
||||||
|
Reference in New Issue
Block a user