summaryrefslogtreecommitdiff
path: root/src/commandline.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2021-01-17 21:26:21 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2021-01-18 08:21:42 -0500
commit6feab2ea8f96704e44a14c212a635dc17f4ba71e (patch)
treee39b12f7cb7f37cd96b3c3f451d2b527a81d4578 /src/commandline.cpp
parent0d641f39776a2d5a1cd217531d3a3e39d3a3c670 (diff)
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
Diffstat (limited to 'src/commandline.cpp')
-rw-r--r--src/commandline.cpp7
1 files changed, 3 insertions, 4 deletions
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 <log.h>
#include <report.h>
@@ -807,7 +806,7 @@ std::optional<int> 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<int> 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<int> 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()));