diff --git a/pcsx2-qt/SettingWidgetBinder.h b/pcsx2-qt/SettingWidgetBinder.h index aef6702cd2..7fa7903fec 100644 --- a/pcsx2-qt/SettingWidgetBinder.h +++ b/pcsx2-qt/SettingWidgetBinder.h @@ -595,7 +595,7 @@ namespace SettingWidgetBinder /// Binds a widget's value to a setting, updating it when the value changes. template - static void BindWidgetToBoolSetting( + static inline void BindWidgetToBoolSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, bool default_value) { using Accessor = SettingAccessor; @@ -636,7 +636,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToIntSetting( + static inline void BindWidgetToIntSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, int default_value, int option_offset = 0) { using Accessor = SettingAccessor; @@ -677,7 +677,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToFloatSetting( + static inline void BindWidgetToFloatSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, float default_value) { using Accessor = SettingAccessor; @@ -718,7 +718,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToNormalizedSetting( + static inline void BindWidgetToNormalizedSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, float range, float default_value) { using Accessor = SettingAccessor; @@ -759,7 +759,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToStringSetting( + static inline void BindWidgetToStringSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, std::string default_value = std::string()) { using Accessor = SettingAccessor; @@ -804,7 +804,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToEnumSetting(SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, + static inline void BindWidgetToEnumSetting(SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, std::optional (*from_string_function)(const char* str), const char* (*to_string_function)(DataType value), DataType default_value) { @@ -866,7 +866,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToEnumSetting( + static inline void BindWidgetToEnumSetting( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, const char** enum_names, DataType default_value) { using Accessor = SettingAccessor; @@ -928,7 +928,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToEnumSetting(SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, + static inline void BindWidgetToEnumSetting(SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, const char** enum_names, const char** enum_values, const char* default_value) { using Accessor = SettingAccessor; @@ -992,7 +992,7 @@ namespace SettingWidgetBinder } template - static void BindWidgetToFolderSetting(SettingsInterface* sif, WidgetType* widget, QAbstractButton* browse_button, + static inline void BindWidgetToFolderSetting(SettingsInterface* sif, WidgetType* widget, QAbstractButton* browse_button, QAbstractButton* open_button, QAbstractButton* reset_button, std::string section, std::string key, std::string default_value, bool use_relative = true) { @@ -1068,7 +1068,7 @@ namespace SettingWidgetBinder } } - [[maybe_unused]] static void BindSliderToIntSetting(SettingsInterface* sif, QSlider* slider, QLabel* label, const QString& label_suffix, + static inline void BindSliderToIntSetting(SettingsInterface* sif, QSlider* slider, QLabel* label, const QString& label_suffix, std::string section, std::string key, s32 default_value) { const s32 global_value = Host::GetBaseIntSettingValue(section.c_str(), key.c_str(), default_value); @@ -1109,8 +1109,8 @@ namespace SettingWidgetBinder }); slider->connect(slider, &QSlider::valueChanged, slider, - [sif, label, label_suffix, section = std::move(section), key = std::move(key), - orig_font = std::move(orig_font), bold_font = std::move(bold_font)](int value) { + [sif, label, label_suffix, section = std::move(section), key = std::move(key), orig_font = std::move(orig_font), + bold_font = std::move(bold_font)](int value) { label->setText(QStringLiteral("%1%2").arg(value).arg(label_suffix)); if (label->font() != bold_font) diff --git a/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h b/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h index 32aed5ceb3..3cc14f76e0 100644 --- a/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h +++ b/pcsx2-qt/Settings/ControllerSettingWidgetBinder.h @@ -38,7 +38,7 @@ namespace ControllerSettingWidgetBinder { /// Interface specific method of BindWidgetToBoolSetting(). template - static void BindWidgetToInputProfileBool( + static inline void BindWidgetToInputProfileBool( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, bool default_value) { using Accessor = SettingWidgetBinder::SettingAccessor; @@ -71,7 +71,7 @@ namespace ControllerSettingWidgetBinder /// Interface specific method of BindWidgetToIntSetting(). template - static void BindWidgetToInputProfileInt( + static inline void BindWidgetToInputProfileInt( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, s32 default_value, s32 option_offset = 0) { using Accessor = SettingWidgetBinder::SettingAccessor; @@ -104,7 +104,7 @@ namespace ControllerSettingWidgetBinder /// Interface specific method of BindWidgetToFloatSetting(). template - static void BindWidgetToInputProfileFloat( + static inline void BindWidgetToInputProfileFloat( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, float default_value, float multiplier = 1.0f) { using Accessor = SettingWidgetBinder::SettingAccessor; @@ -137,12 +137,11 @@ namespace ControllerSettingWidgetBinder /// Interface specific method of BindWidgetToNormalizedSetting(). template - static void BindWidgetToInputProfileNormalized( + static inline void BindWidgetToInputProfileNormalized( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, float range, float default_value) { using Accessor = SettingWidgetBinder::SettingAccessor; - if (sif) { const float value = sif->GetFloatValue(section.c_str(), key.c_str(), default_value); @@ -171,7 +170,7 @@ namespace ControllerSettingWidgetBinder /// Interface specific method of BindWidgetToStringSetting(). template - static void BindWidgetToInputProfileString( + static inline void BindWidgetToInputProfileString( SettingsInterface* sif, WidgetType* widget, std::string section, std::string key, std::string default_value = std::string()) { using Accessor = SettingWidgetBinder::SettingAccessor;