From 2627241541a2b2bc691c2776f111f95d7bd94c70 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Mon, 13 Jul 2020 21:48:56 -0400 Subject: configuration_shared: Use an int instead of a QString I noticed some of the code could be reduced to just passing the function an int, since I was doing the same thing over and over. Also clang-formats configure_graphics --- src/yuzu/configuration/configuration_shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.cpp') diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 28b655222..a648d339b 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -125,8 +125,8 @@ void ConfigurationShared::InsertGlobalItem(QComboBox* combobox) { combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } -void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, const QString& global) { - const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(global); +void ConfigurationShared::InsertGlobalItem(QComboBox* combobox, int global_index) { + const QString use_global_text = ConfigurePerGame::tr("Use global configuration (%1)").arg(combobox->itemText(global_index)); combobox->insertItem(ConfigurationShared::USE_GLOBAL_INDEX, use_global_text); combobox->insertSeparator(ConfigurationShared::USE_GLOBAL_SEPARATOR_INDEX); } -- cgit v1.2.3