From 17255cd835a4727ab83fd2bfa1b4d21a98a19f61 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 19 May 2019 12:47:30 -0400 Subject: yuzu/configuration/configure_per_general: Specify string conversions explicitly Allows the per-game configuration to be successfully built with implicit string conversions disabled. --- src/yuzu/configuration/configure_per_general.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/yuzu/configuration/configure_per_general.cpp b/src/yuzu/configuration/configure_per_general.cpp index 022b94609..2bdfc8e5a 100644 --- a/src/yuzu/configuration/configure_per_general.cpp +++ b/src/yuzu/configuration/configure_per_general.cpp @@ -88,15 +88,15 @@ void ConfigurePerGameGeneral::loadFromFile(FileSys::VirtualFile file) { } void ConfigurePerGameGeneral::loadConfiguration() { - if (file == nullptr) + if (file == nullptr) { return; + } - const auto loader = Loader::GetLoader(file); - - ui->display_title_id->setText(fmt::format("{:016X}", title_id).c_str()); + ui->display_title_id->setText(QString::fromStdString(fmt::format("{:016X}", title_id))); FileSys::PatchManager pm{title_id}; const auto control = pm.GetControlMetadata(); + const auto loader = Loader::GetLoader(file); if (control.first != nullptr) { ui->display_version->setText(QString::fromStdString(control.first->GetVersionString())); @@ -142,8 +142,10 @@ void ConfigurePerGameGeneral::loadConfiguration() { const auto& disabled = Settings::values.disabled_addons[title_id]; for (const auto& patch : pm.GetPatchVersionNames(update_raw)) { - QStandardItem* first_item = new QStandardItem; - const auto name = QString::fromStdString(patch.first).replace("[D] ", ""); + const auto name = + QString::fromStdString(patch.first).replace(QStringLiteral("[D] "), QString{}); + + auto* const first_item = new QStandardItem; first_item->setText(name); first_item->setCheckable(true); -- cgit v1.2.3