From 6feab2ea8f96704e44a14c212a635dc17f4ba71e Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 17 Jan 2021 21:26:21 -0500 Subject: moved criticalOnTop() to uibase changed all calls to reportError(), which now uses the main window if it exists as a parent, or calls criticalOnTop() added errors when running something from the command line for a different instance/profile removed unused crap --- src/commandline.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/commandline.cpp') diff --git a/src/commandline.cpp b/src/commandline.cpp index 97d54b92..477bfba1 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -5,7 +5,6 @@ #include "multiprocess.h" #include "loglist.h" #include "shared/util.h" -#include "shared/error_report.h" #include "shared/appconfig.h" #include #include @@ -807,7 +806,7 @@ std::optional RunCommand::runPostOrganizer(OrganizerCore& core) if (itor == exes.end()) { // not found - MOShared::criticalOnTop( + reportError( QObject::tr("Executable '%1' not found in instance '%2'.") .arg(program) .arg(InstanceManager::singleton().currentInstance()->name())); @@ -833,7 +832,7 @@ std::optional RunCommand::runPostOrganizer(OrganizerCore& core) const auto r = p.run(); if (r == ProcessRunner::Error) { - MOShared::criticalOnTop( + reportError( QObject::tr("Failed to run '%1'. The logs might have more information.").arg(program)); return 1; @@ -842,7 +841,7 @@ std::optional RunCommand::runPostOrganizer(OrganizerCore& core) return 0; } catch (const std::exception &e) { - MOShared::criticalOnTop( + reportError( QObject::tr("Failed to run '%1'. The logs might have more information. %2") .arg(program).arg(e.what())); -- cgit v1.3.1