summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configuration_shared.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-14 14:02:37 -0400
committerLioncash <mathew1800@gmail.com>2020-08-14 14:17:02 -0400
commitfe861098778c325264bf015488fd960d5f33c6d6 (patch)
treea6cd86f4b79299895abde4eca2cc9e8f3060d55a /src/yuzu/configuration/configuration_shared.h
parentf482b4b40de1f8bd89cc555c7219efe0497c38f6 (diff)
configuration_shared: Simplify name lookup in highlighting functions
We can query the given object name directly from the widget itself. This removes any potential for forgetting to change the name if the widget gets renamed and makes the API much simpler (just pass in the widget, and not worry about its name).
Diffstat (limited to 'src/yuzu/configuration/configuration_shared.h')
-rw-r--r--src/yuzu/configuration/configuration_shared.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index 003148c68..312b9e549 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -39,13 +39,12 @@ void SetPerGameSetting(QComboBox* combobox,
void SetPerGameSetting(QComboBox* combobox,
const Settings::Setting<Settings::GPUAccuracy>* setting);
-void SetHighlight(QWidget* widget, const std::string& name, bool highlighted);
-void SetColoredTristate(QCheckBox* checkbox, const std::string& name,
- const Settings::Setting<bool>& setting, CheckState& tracker);
-void SetColoredTristate(QCheckBox* checkbox, const std::string& name, bool global, bool state,
- bool global_state, CheckState& tracker);
-void SetColoredComboBox(QComboBox* combobox, QWidget* target, const std::string& target_name,
- int global);
+void SetHighlight(QWidget* widget, bool highlighted);
+void SetColoredTristate(QCheckBox* checkbox, const Settings::Setting<bool>& setting,
+ CheckState& tracker);
+void SetColoredTristate(QCheckBox* checkbox, bool global, bool state, bool global_state,
+ CheckState& tracker);
+void SetColoredComboBox(QComboBox* combobox, QWidget* target, int global);
void InsertGlobalItem(QComboBox* combobox, int global_index);