forked from qt-creator/qt-creator
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 <christian.kandeler@qt.io>
This commit is contained in:
@@ -218,8 +218,13 @@ QString RunConfiguration::disabledReason() const
|
|||||||
return tr("The project no longer builds the target associated with this run configuration.");
|
return tr("The project no longer builds the target associated with this run configuration.");
|
||||||
if (target()->project()->isParsing())
|
if (target()->project()->isParsing())
|
||||||
return tr("The Project is currently being parsed.");
|
return tr("The Project is currently being parsed.");
|
||||||
if (!target()->project()->hasParsingData())
|
if (!target()->project()->hasParsingData()) {
|
||||||
return tr("The project could not be fully parsed.");
|
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();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user