diff --git a/src/plugins/compilerexplorer/compilerexplorereditor.cpp b/src/plugins/compilerexplorer/compilerexplorereditor.cpp index 7946e92b821..d5003cf8c20 100644 --- a/src/plugins/compilerexplorer/compilerexplorereditor.cpp +++ b/src/plugins/compilerexplorer/compilerexplorereditor.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -464,7 +465,8 @@ void CompilerWidget::doCompile() m_marks.append(mark); } } catch (const std::exception &e) { - qCritical() << "Exception: " << e.what(); + Core::MessageManager::writeDisrupting( + Tr::tr("Failed to compile: \"%1\"").arg(QString::fromUtf8(e.what()))); } }); diff --git a/src/plugins/compilerexplorer/compilerexplorersettings.cpp b/src/plugins/compilerexplorer/compilerexplorersettings.cpp index 8accdbcc214..2cd22aa6414 100644 --- a/src/plugins/compilerexplorer/compilerexplorersettings.cpp +++ b/src/plugins/compilerexplorer/compilerexplorersettings.cpp @@ -8,6 +8,8 @@ #include "api/language.h" #include "api/library.h" +#include + #include #include #include @@ -207,8 +209,9 @@ void CompilerSettings::fillLibraries(const LibrarySelectionAspect::ResultCallbac cachedLibraries(lang) = watcher->result(); fillFromCache(); } catch (const std::exception &e) { - qCritical() << e.what(); - return; + Core::MessageManager::writeDisrupting( + Tr::tr("Failed to fetch libraries: \"%1\"") + .arg(QString::fromUtf8(e.what()))); } }); watcher->setFuture(future); @@ -249,8 +252,9 @@ void SourceSettings::fillLanguageIdModel(const Utils::StringSelectionAspect::Res cachedLanguages() = watcher->result(); fillFromCache(); } catch (const std::exception &e) { - qCritical() << e.what(); - return; + Core::MessageManager::writeDisrupting( + Tr::tr("Failed to fetch languages: \"%1\"") + .arg(QString::fromUtf8(e.what()))); } }); watcher->setFuture(future); @@ -290,8 +294,9 @@ void CompilerSettings::fillCompilerModel(const Utils::StringSelectionAspect::Res fillFromCache(itCache); } catch (const std::exception &e) { - qCritical() << e.what(); - return; + Core::MessageManager::writeDisrupting( + Tr::tr("Failed to fetch compilers: \"%1\"") + .arg(QString::fromUtf8(e.what()))); } }); watcher->setFuture(future);