summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-07-17 11:53:25 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-07-22 07:33:38 -0400
commit28c46eed919cf3044147f642ea0a8d9909fea2ea (patch)
tree1b84ae2a440536b2b8ba192f9402ae8673b61753
parent3bf7717c0a8507c9befce6b74c84c4dbdcac99de (diff)
reversed log level menu actions to fit settings combobox
replaced qWarnings() and qCritical()
-rw-r--r--src/main.cpp11
-rw-r--r--src/mainwindow.cpp6
2 files changed, 7 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index aa842ead..b89e4a80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -133,9 +133,9 @@ static LONG WINAPI MyUnhandledExceptionFilter(struct _EXCEPTION_POINTERS *except
int dumpRes =
CreateMiniDump(exceptionPtrs, OrganizerCore::getGlobalCrashDumpsType(), dumpPath.c_str());
if (!dumpRes)
- qCritical("ModOrganizer has crashed, crash dump created.");
+ log::error("ModOrganizer has crashed, crash dump created.");
else
- qCritical("ModOrganizer has crashed, CreateMiniDump failed (%d, error %lu).", dumpRes, GetLastError());
+ log::error("ModOrganizer has crashed, CreateMiniDump failed ({}, error {}).", dumpRes, GetLastError());
if (prevUnhandledExceptionFilter)
return prevUnhandledExceptionFilter(exceptionPtrs);
@@ -456,16 +456,13 @@ void preloadDll(const QString& filename)
const auto dllPath = appPath + "\\" + filename;
if (!QFile::exists(dllPath)) {
- qWarning().nospace() << dllPath << "not found";
+ log::warn("{} not found", dllPath);
return;
}
if (!LoadLibraryW(dllPath.toStdWString().c_str())) {
const auto e = GetLastError();
-
- qWarning().nospace()
- << "failed to load " << dllPath << ": "
- << formatSystemMessage(e);
+ log::warn("failed to load {}: {}", dllPath, formatSystemMessageQ(e));
}
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f65bf4e1..6c2ab389 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -833,10 +833,10 @@ void MainWindow::setupLogMenu()
levels->addAction(a);
};
- addAction(tr("&Errors"), log::Error);
- addAction(tr("&Warnings"), log::Warning);
- addAction(tr("&Info"), log::Info);
addAction(tr("&Debug"), log::Debug);
+ addAction(tr("&Info"), log::Info);
+ addAction(tr("&Warnings"), log::Warning);
+ addAction(tr("&Errors"), log::Error);
menu->popup(ui->logList->viewport()->mapToGlobal(pos));
});