forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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()>;
|
||||
|
Reference in New Issue
Block a user