summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-04-09 10:44:29 -0400
committerGravatar Lioncash2019-04-09 10:49:38 -0400
commitb73e433dff282a9e2f7636d34ab298a2eb749274 (patch)
tree1cf7354509310e5afc9711f8b5aee60e14e6b838
parentMerge pull request #2300 from FernandoS27/null-shader (diff)
downloadyuzu-b73e433dff282a9e2f7636d34ab298a2eb749274.tar.gz
yuzu-b73e433dff282a9e2f7636d34ab298a2eb749274.tar.xz
yuzu-b73e433dff282a9e2f7636d34ab298a2eb749274.zip
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 '')
-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 86f6d0165..4e2d988cd 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
192 } 192 }
193 193
194 // update labels and progress bar 194 // update labels and progress bar
195 ui->stage->setText(stage_translations[stage].arg(value).arg(total)); 195 if (stage == VideoCore::LoadCallbackStage::Decompile ||
196 stage == VideoCore::LoadCallbackStage::Build) {
197 ui->stage->setText(stage_translations[stage].arg(value).arg(total));
198 } else {
199 ui->stage->setText(stage_translations[stage]);
200 }
196 ui->value->setText(estimate); 201 ui->value->setText(estimate);
197 ui->progress_bar->setValue(static_cast<int>(value)); 202 ui->progress_bar->setValue(static_cast<int>(value));
198 previous_time = now; 203 previous_time = now;