summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/projectexplorer/msvctoolchain.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp
index 5bb3fe8d07..d6c1ba9b57 100644
--- a/src/plugins/projectexplorer/msvctoolchain.cpp
+++ b/src/plugins/projectexplorer/msvctoolchain.cpp
@@ -8,6 +8,7 @@
#include "projectexplorer.h"
#include "projectexplorerconstants.h"
#include "projectexplorersettings.h"
+#include "projectexplorertr.h"
#include "taskhub.h"
#include <coreplugin/icore.h>
@@ -776,9 +777,19 @@ void MsvcToolChain::initEnvModWatcher(const QFuture<GenerateEnvResult> &future)
QObject::connect(&m_envModWatcher, &QFutureWatcher<GenerateEnvResult>::resultReadyAt, [&]() {
const GenerateEnvResult &result = m_envModWatcher.result();
if (result.error) {
- const QString &errorMessage = *result.error;
- if (!errorMessage.isEmpty())
- TaskHub::addTask(CompileTask(Task::Error, errorMessage));
+ QString errorMessage = *result.error;
+ if (!errorMessage.isEmpty()) {
+ Task::TaskType severity;
+ if (m_environmentModifications.isEmpty()) {
+ severity = Task::Error;
+ } else {
+ severity = Task::Warning;
+ errorMessage.prepend(
+ Tr::tr("Falling back to use the cached environment for \"%1\" after:")
+ .arg(displayName()) + '\n');
+ }
+ TaskHub::addTask(CompileTask(severity, errorMessage));
+ }
} else {
updateEnvironmentModifications(result.environmentItems);
}