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/instancemanager.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
(limited to 'src/instancemanager.cpp')
diff --git a/src/instancemanager.cpp b/src/instancemanager.cpp
index a9905b75..8add4af8 100644
--- a/src/instancemanager.cpp
+++ b/src/instancemanager.cpp
@@ -28,7 +28,6 @@ along with Mod Organizer. If not, see .
#include "createinstancedialogpages.h"
#include "shared/appconfig.h"
#include "shared/util.h"
-#include "shared/error_report.h"
#include
#include
#include
@@ -896,7 +895,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
// unreadable ini, there's not much that can be done, select another
// instance
- MOShared::criticalOnTop(
+ reportError(
QObject::tr("Cannot open instance '%1', failed to read INI file %2.")
.arg(instance.name()).arg(instance.iniPath()));
@@ -911,7 +910,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
//
// ask the user for the game managed by this instance
- MOShared::criticalOnTop(
+ reportError(
QObject::tr(
"Cannot open instance '%1', the managed game was not found in the INI "
"file %2. Select the game managed by this instance.")
@@ -925,7 +924,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
// there is no plugin that can handle the game name/directory from the
// ini, so this instance is unusable
- MOShared::criticalOnTop(
+ reportError(
QObject::tr(
"Cannot open instance '%1', the game plugin '%2' doesn't exist. It "
"may have been deleted by an antivirus. Select another instance.")
@@ -939,7 +938,7 @@ SetupInstanceResults setupInstance(Instance& instance, PluginContainer& pc)
// the game directory doesn't exist or the plugin doesn't recognize it;
// ask the user for the game managed by this instance
- MOShared::criticalOnTop(
+ reportError(
QObject::tr(
"Cannot open instance '%1', the game directory '%2' doesn't exist or "
"the game plugin '%3' doesn't recognize it. Select the game managed "
--
cgit v1.3.1