CMakePM: Add issue icon and tooltip description on project failure

If a project fails to load it will be displayed with a warning icon.

If the CMake configuration fails and the backup configuration is
restored, the project is also marked with a warning icon.

Change-Id: I95ccc5d171f5b789fe317fbb1da9e13dcd81a5dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-09-21 22:22:37 +02:00
parent 519c2f3109
commit 3922b1a917
6 changed files with 66 additions and 15 deletions

View File

@@ -42,6 +42,7 @@ namespace ProjectExplorer { class ExtraCompiler; }
namespace CMakeProjectManager {
class CMakeBuildConfiguration;
class CMakeProject;
namespace Internal {
@@ -101,6 +102,8 @@ public:
bool isMultiConfig() const;
bool usesAllCapsTargets() const;
CMakeProject *project() const;
private:
// Actually ask for parsing:
enum ReparseParameters {
@@ -128,7 +131,7 @@ private:
void handleTreeScanningFinished();
// Combining Treescanner and Parser states:
void combineScanAndParse();
void combineScanAndParse(bool restoredFromBackup);
std::unique_ptr<CMakeProjectNode> generateProjectTree(
const ProjectExplorer::TreeScanner::Result &allFiles, bool failedToParse);
@@ -143,7 +146,7 @@ private:
const QList<QByteArray> &moduleMappings);
void updateInitialCMakeExpandableVars();
void handleParsingSucceeded();
void handleParsingSucceeded(bool restoredFromBackup);
void handleParsingFailed(const QString &msg);
void wireUpConnections();