aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/loading_screen.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-09 10:44:29 -0400
committerLioncash <mathew1800@gmail.com>2019-04-09 10:49:38 -0400
commitaf836c2968677a0dd5746220e82da03b9cda2298 (patch)
tree1cf7354509310e5afc9711f8b5aee60e14e6b838 /src/yuzu/loading_screen.cpp
parent74386a009bac023c165c03c79ecd72524bbf1e31 (diff)
yuzu/loading_screen: Resolve runtime Qt string formatting warnings
In our error console, when loading a game, the strings: QString::arg: Argument missing: "Loading...", 0 QString::arg: Argument missing: "Launching...", 0 would occasionally pop up when the loading screen was running. This was due to the strings being assumed to have formatting indicators in them, however only two out of the four strings actually have them. This only applies the arguments to the strings that have formatting specifiers provided, which avoids these warnings from occurring.
Diffstat (limited to 'src/yuzu/loading_screen.cpp')
-rw-r--r--src/yuzu/loading_screen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp
index 86f6d0165a..4e2d988cd7 100644
--- a/src/yuzu/loading_screen.cpp
+++ b/src/yuzu/loading_screen.cpp
@@ -192,7 +192,12 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size
}
// update labels and progress bar
- ui->stage->setText(stage_translations[stage].arg(value).arg(total));
+ if (stage == VideoCore::LoadCallbackStage::Decompile ||
+ stage == VideoCore::LoadCallbackStage::Build) {
+ ui->stage->setText(stage_translations[stage].arg(value).arg(total));
+ } else {
+ ui->stage->setText(stage_translations[stage]);
+ }
ui->value->setText(estimate);
ui->progress_bar->setValue(static_cast<int>(value));
previous_time = now;