diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 16:51:55 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-07 20:16:26 -0500 |
| commit | d288587b002b19c54dc08d08ae267d301aa2ac81 (patch) | |
| tree | c4b6df6d09d3235d19457d4544c43c5a269aaa3a /src/shared | |
| parent | a8187e7dc47cd344fd309a2be3675e4687f95aaa (diff) | |
moved instance setup/selection to instancemanager.cpp
comments
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/error_report.cpp | 10 | ||||
| -rw-r--r-- | src/shared/error_report.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/shared/error_report.cpp b/src/shared/error_report.cpp index 4185b544..09fdcb49 100644 --- a/src/shared/error_report.cpp +++ b/src/shared/error_report.cpp @@ -51,4 +51,14 @@ void reportError(LPCWSTR format, ...) MessageBoxW(nullptr, buffer, L"Error", MB_OK | MB_ICONERROR);
}
+void criticalOnTop(const QString& message)
+{
+ QMessageBox mb(QMessageBox::Critical, QObject::tr("Mod Organizer"), message);
+
+ mb.show();
+ mb.activateWindow();
+ mb.raise();
+ mb.exec();
+}
+
} // namespace MOShared
diff --git a/src/shared/error_report.h b/src/shared/error_report.h index da07c728..9343d3da 100644 --- a/src/shared/error_report.h +++ b/src/shared/error_report.h @@ -31,6 +31,14 @@ namespace MOShared void reportError(LPCSTR format, ...);
void reportError(LPCWSTR format, ...);
+// shows a critical message box that's raised to the top of the zorder, useful
+// for messages without a main window, which sometimes makes them pop up behind
+// all other windows
+//
+// the dialog is not topmost, it's just raised once when shown
+//
+void criticalOnTop(const QString& message);
+
} // namespace MOShared
#endif // MODORGANIZER_SHARED_ERROR_REPORT_INCLUDED
|
