forked from qt-creator/qt-creator
QmlProjectManager: Fix QmlProjectRunConfiguration::updateEnabledState
Amends 8536504caa
.
Change-Id: I20d26dd326dc50609f25de1f04f99a5f1ec186a6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -375,16 +375,12 @@ QString QmlProjectRunConfiguration::commandLineArguments() const
|
|||||||
|
|
||||||
void QmlProjectRunConfiguration::updateEnabledState()
|
void QmlProjectRunConfiguration::updateEnabledState()
|
||||||
{
|
{
|
||||||
bool qmlFileFound = m_mainQmlFileAspect->isQmlFilePresent();
|
bool enabled = false;
|
||||||
if (!qmlFileFound) {
|
if (m_mainQmlFileAspect->isQmlFilePresent() && !executable().isEmpty()) {
|
||||||
setEnabled(false);
|
Project *p = target()->project();
|
||||||
} else {
|
enabled = !p->isParsing() && p->hasParsingData();
|
||||||
const QString exe = executable();
|
|
||||||
if (exe.isEmpty())
|
|
||||||
setEnabled(false);
|
|
||||||
else
|
|
||||||
RunConfiguration::updateEnabledState();
|
|
||||||
}
|
}
|
||||||
|
setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainQmlFileAspect::isQmlFilePresent()
|
bool MainQmlFileAspect::isQmlFilePresent()
|
||||||
|
Reference in New Issue
Block a user