From fe861098778c325264bf015488fd960d5f33c6d6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 14 Aug 2020 14:02:37 -0400 Subject: 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). --- src/yuzu/configuration/configuration_shared.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/yuzu/configuration/configuration_shared.h') 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* setting); -void SetHighlight(QWidget* widget, const std::string& name, bool highlighted); -void SetColoredTristate(QCheckBox* checkbox, const std::string& name, - const Settings::Setting& 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& 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); -- cgit v1.2.3