ProjectExplorer: Allow to schedule a build/run during a project parse

Once we parsed the project initially, subsequent parses typically do not
change things in a major way, so we can expect e.g. run configurations to
stay intact.
It therefore makes sense to allow users to schedule an
application run not only during a build (see 4b92b7ac60), but also
during a parse. Arguably, this is even more relevant, as parsing is
usually not triggered directly by the user, but happens as a side effect
of editing a document or switching a branch. It is then annoying for
users to have to wait until the respective buttons get enabled again.

Fixes: QTCREATORBUG-24986
Change-Id: I1081ccde668eee794c39b96cd0bad5c3aaa580bc
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-12-03 15:17:23 +01:00
parent 2839d9fa92
commit 29ddb3bcdb
7 changed files with 55 additions and 23 deletions

View File

@@ -531,13 +531,11 @@ void BuildConfiguration::setUserEnvironmentChanges(const EnvironmentItems &diff)
bool BuildConfiguration::isEnabled() const
{
return !buildSystem()->isParsing() && buildSystem()->hasParsingData();
return buildSystem()->hasParsingData();
}
QString BuildConfiguration::disabledReason() const
{
if (buildSystem()->isParsing())
return (tr("The project is currently being parsed."));
if (!buildSystem()->hasParsingData())
return (tr("The project was not parsed successfully."));
return QString();