From c255562fec3b27c49b436c3678b9d64ba72b54d8 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 22 Feb 2019 12:32:38 +0100 Subject: [PATCH] ProjectExplorer: Improve error message in case of missing project file This was kind of done for AndroidRunConfigurations, but seems uniformly applicable as all projects have something like a "project file" currently. Change-Id: I48e1887ea900181b5bf42f75fb9412379a8320dc Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/runconfiguration.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 06eeecb587f..4b52f645a10 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -218,8 +218,13 @@ QString RunConfiguration::disabledReason() const return tr("The project no longer builds the target associated with this run configuration."); if (target()->project()->isParsing()) return tr("The Project is currently being parsed."); - if (!target()->project()->hasParsingData()) - return tr("The project could not be fully parsed."); + if (!target()->project()->hasParsingData()) { + QString msg = tr("The project could not be fully parsed."); + const FileName projectFilePath = buildTargetInfo().projectFilePath; + if (!projectFilePath.exists()) + msg += '\n' + tr("The project file \"%1\" does not exist.").arg(projectFilePath.toString()); + return msg; + } return QString(); }