diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-11-18 13:54:35 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-11-18 14:37:19 +0000 |
commit | ccf5daa16d8ef8f6da844a1d550963dd5e3f137d (patch) | |
tree | 718be34575694eedb6ada3c77b4ef22b7dc740ac /src | |
parent | 45429a3c44c5daae8b00d72ecd67e1e7cc3091d0 (diff) |
ProjectExplorer: Un-tighten the RunConfiguration::isConfigured() check
Only report a run configuration as unconfigured if it has a fundamental
problem that should inhibit automatic creation.
Adapt the potentially reported issue in QdbRunConfiguration accordingly.
The concrete reason is that for cmake projects, deployment information
is only available after deployment has happened, so the on-device
exutable is not known right away.
Task-number: QTCREATORBUG-24685
Change-Id: Ibe49649ebb001d3ba2b752c9c335687da9c08ce7
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/boot2qt/qdbrunconfiguration.cpp | 4 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runconfiguration.cpp | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/runconfiguration.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/boot2qt/qdbrunconfiguration.cpp b/src/plugins/boot2qt/qdbrunconfiguration.cpp index 15d207fdbf..56dc0af8d6 100644 --- a/src/plugins/boot2qt/qdbrunconfiguration.cpp +++ b/src/plugins/boot2qt/qdbrunconfiguration.cpp @@ -125,8 +125,8 @@ Tasks QdbRunConfiguration::checkForIssues() const { Tasks tasks; if (aspect<ExecutableAspect>()->executable().toString().isEmpty()) { - tasks << createConfigurationIssue(tr("The remote executable must be set " - "in order to run on a Boot2Qt device.")); + tasks << BuildSystemTask(Task::Warning, tr("The remote executable must be set " + "in order to run on a Boot2Qt device.")); } return tasks; } diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 37b0e9fc92..1be65b84e6 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -221,6 +221,11 @@ QWidget *RunConfiguration::createConfigurationWidget() return detailsWidget; } +bool RunConfiguration::isConfigured() const +{ + return !Utils::anyOf(checkForIssues(), [](const Task &t) { return t.type == Task::Error; }); +} + void RunConfiguration::addAspectFactory(const AspectFactory &aspectFactory) { theAspectFactories.push_back(aspectFactory); diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 170028aee9..9382c46be0 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -134,7 +134,7 @@ public: QWidget *createConfigurationWidget(); - bool isConfigured() const { return checkForIssues().isEmpty(); } + bool isConfigured() const; virtual Tasks checkForIssues() const { return {}; } using CommandLineGetter = std::function<Utils::CommandLine()>; |