citra_qt: Migrate logging macros
Follow-up of #3533 Replace prefix of all logging macros from LOG to NGLOG
This commit is contained in:
parent
9283053701
commit
79b0e62455
4 changed files with 21 additions and 25 deletions
|
@ -2,7 +2,6 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cinttypes>
|
||||
#include <clocale>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
@ -470,20 +469,20 @@ void GMainWindow::OnCheckForUpdates() {
|
|||
|
||||
void GMainWindow::CheckForUpdates() {
|
||||
if (updater->CheckForUpdates()) {
|
||||
LOG_INFO(Frontend, "Update check started");
|
||||
NGLOG_INFO(Frontend, "Update check started");
|
||||
} else {
|
||||
LOG_WARNING(Frontend, "Unable to start check for updates");
|
||||
NGLOG_WARNING(Frontend, "Unable to start check for updates");
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::OnUpdateFound(bool found, bool error) {
|
||||
if (error) {
|
||||
LOG_WARNING(Frontend, "Update check failed");
|
||||
NGLOG_WARNING(Frontend, "Update check failed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
LOG_INFO(Frontend, "No updates found");
|
||||
NGLOG_INFO(Frontend, "No updates found");
|
||||
|
||||
// If the user explicitly clicked the "Check for Updates" button, we are
|
||||
// going to want to show them a prompt anyway.
|
||||
|
@ -495,12 +494,12 @@ void GMainWindow::OnUpdateFound(bool found, bool error) {
|
|||
}
|
||||
|
||||
if (emulation_running && !explicit_update_check) {
|
||||
LOG_INFO(Frontend, "Update found, deferring as game is running");
|
||||
NGLOG_INFO(Frontend, "Update found, deferring as game is running");
|
||||
defer_update_prompt = true;
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_INFO(Frontend, "Update found!");
|
||||
NGLOG_INFO(Frontend, "Update found!");
|
||||
explicit_update_check = false;
|
||||
|
||||
ShowUpdatePrompt();
|
||||
|
@ -552,14 +551,13 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||
if (result != Core::System::ResultStatus::Success) {
|
||||
switch (result) {
|
||||
case Core::System::ResultStatus::ErrorGetLoader:
|
||||
LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!",
|
||||
filename.toStdString().c_str());
|
||||
NGLOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filename.toStdString());
|
||||
QMessageBox::critical(this, tr("Error while loading ROM!"),
|
||||
tr("The ROM format is not supported."));
|
||||
break;
|
||||
|
||||
case Core::System::ResultStatus::ErrorSystemMode:
|
||||
LOG_CRITICAL(Frontend, "Failed to load ROM!");
|
||||
NGLOG_CRITICAL(Frontend, "Failed to load ROM!");
|
||||
QMessageBox::critical(this, tr("Error while loading ROM!"),
|
||||
tr("Could not determine the system mode."));
|
||||
break;
|
||||
|
@ -610,7 +608,7 @@ bool GMainWindow::LoadROM(const QString& filename) {
|
|||
}
|
||||
|
||||
void GMainWindow::BootGame(const QString& filename) {
|
||||
LOG_INFO(Frontend, "Citra starting...");
|
||||
NGLOG_INFO(Frontend, "Citra starting...");
|
||||
StoreRecentFile(filename); // Put the filename on top of the list
|
||||
|
||||
if (!LoadROM(filename))
|
||||
|
@ -754,7 +752,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
|
|||
"content/";
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR(Frontend, "Unexpected target %d", target);
|
||||
NGLOG_ERROR(Frontend, "Unexpected target {}", static_cast<int>(target));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -768,8 +766,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
|
|||
return;
|
||||
}
|
||||
|
||||
LOG_INFO(Frontend, "Opening %s path for program_id=%016" PRIx64, open_target.c_str(),
|
||||
program_id);
|
||||
NGLOG_INFO(Frontend, "Opening {} path for program_id={:#016}", open_target, program_id);
|
||||
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(qpath));
|
||||
}
|
||||
|
@ -1233,7 +1230,7 @@ void GMainWindow::UpdateUITheme() {
|
|||
QString theme_uri(":" + UISettings::values.theme + "/style.qss");
|
||||
QFile f(theme_uri);
|
||||
if (!f.exists()) {
|
||||
LOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
|
||||
NGLOG_ERROR(Frontend, "Unable to set style, stylesheet file not found");
|
||||
} else {
|
||||
f.open(QFile::ReadOnly | QFile::Text);
|
||||
QTextStream ts(&f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue