aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/qmakeprojectmanager/qmakeproject.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
index 3b5e4531b6..dee31c56af 100644
--- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp
+++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp
@@ -523,6 +523,21 @@ void QmakeProject::asyncUpdate()
m_asyncUpdateFutureInterface->reportStarted();
+ const Kit * const kit = activeTarget() ? activeTarget()->kit() : nullptr;
+ QtSupport::BaseQtVersion * const qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
+ if (!qtVersion || !qtVersion->isValid()) {
+ const QString errorMessage = kit
+ ? tr("Cannot parse project \"%1\": The currently selected kit \"%2\" does not "
+ "have a valid Qt.").arg(displayName(), kit->displayName())
+ : tr("Cannot parse project \"%1\": No kit selected.").arg(displayName());
+ proFileParseError(errorMessage);
+ m_asyncUpdateFutureInterface->reportCanceled();
+ m_asyncUpdateFutureInterface->reportFinished();
+ delete m_asyncUpdateFutureInterface;
+ m_asyncUpdateFutureInterface = nullptr;
+ return;
+ }
+
if (m_asyncUpdateState == AsyncFullUpdatePending) {
rootProFile()->asyncUpdate();
} else {