CMakePM: Display CMake project loading errors/warnings in issue pane

Currently the errors / warnings were visible only in Project mode.
Now they will appear in the build system issues pane, so that the
user knows that something is wrong with the project.

Change-Id: I4e0e6aebed86fdb9ea757692255cdbde37cf58a3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2021-09-21 12:42:44 +02:00
parent 6587feb3d8
commit 87c1f597e3

View File

@@ -51,9 +51,10 @@
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/namedwidget.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/target.h>
#include <projectexplorer/taskhub.h>
#include <qtsupport/baseqtversion.h>
#include <qtsupport/qtbuildaspects.h>
@@ -1175,6 +1176,7 @@ void CMakeBuildConfiguration::setError(const QString &message)
qCDebug(cmakeBuildConfigurationLog) << "Emitting enabledChanged signal";
emit enabledChanged();
}
TaskHub::addTask(BuildSystemTask(Task::TaskType::Error, message));
emit errorOccurred(m_error);
}
@@ -1183,6 +1185,7 @@ void CMakeBuildConfiguration::setWarning(const QString &message)
if (m_warning == message)
return;
m_warning = message;
TaskHub::addTask(BuildSystemTask(Task::TaskType::Warning, message));
emit warningOccurred(m_warning);
}