From 789a2a131c4e58493022e03456dae861cfc29938 Mon Sep 17 00:00:00 2001 From: Artur Wojcik Date: Wed, 16 Nov 2022 14:41:54 +0100 Subject: [PATCH] Use the previous naming to keep source compatibility --- qrenderdoc/Code/Interface/Extensions.h | 8 ++++---- qrenderdoc/Code/MiniQtHelper.cpp | 6 +++--- qrenderdoc/Code/MiniQtHelper.h | 6 +++--- qrenderdoc/Windows/PythonShell.cpp | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/qrenderdoc/Code/Interface/Extensions.h b/qrenderdoc/Code/Interface/Extensions.h index 5ce9e2a3e..56292c801 100644 --- a/qrenderdoc/Code/Interface/Extensions.h +++ b/qrenderdoc/Code/Interface/Extensions.h @@ -891,7 +891,7 @@ happen. DOCUMENT(R"(Create a drop-down combo box widget. When created there are no pre-defined entries in the drop-down section. This can be changed with -:meth:`SetComboBoxOptions`. +:meth:`SetComboOptions`. :param bool editable: ``True`` if the widget should allow the user to enter any text they wish as well as being able to select a pre-defined entry. @@ -908,7 +908,7 @@ passed nothing will happen. :param QWidget combo: The combo box. :param List[str] options: The new options for the combo box. )"); - virtual void SetComboBoxOptions(QWidget *combo, const rdcarray &options) = 0; + virtual void SetComboOptions(QWidget *combo, const rdcarray &options) = 0; DOCUMENT(R"(Get the number of options in a drop-down combo box. If another type of widget is passed ``0`` will be returned. @@ -917,7 +917,7 @@ passed ``0`` will be returned. :return: The current number of options. :rtype: int )") - virtual size_t GetComboBoxCount(QWidget *combo) = 0; + virtual size_t GetComboCount(QWidget *combo) = 0; DOCUMENT(R"(Select the current option in a drop-down combo box. If another type of widget or an unknown option is passed, nothing will happen. @@ -925,7 +925,7 @@ an unknown option is passed, nothing will happen. :param QWidget combo: The combo box. :param str option: The option to select. )") - virtual void SelectComboBoxOption(QWidget *combo, const rdcstr &option) = 0; + virtual void SelectComboOption(QWidget *combo, const rdcstr &option) = 0; protected: DOCUMENT(""); diff --git a/qrenderdoc/Code/MiniQtHelper.cpp b/qrenderdoc/Code/MiniQtHelper.cpp index 969336fe4..0fe552667 100644 --- a/qrenderdoc/Code/MiniQtHelper.cpp +++ b/qrenderdoc/Code/MiniQtHelper.cpp @@ -686,7 +686,7 @@ QWidget *MiniQtHelper::CreateComboBox(bool editable, WidgetCallback changed) return w; } -void MiniQtHelper::SetComboBoxOptions(QWidget *combo, const rdcarray &options) +void MiniQtHelper::SetComboOptions(QWidget *combo, const rdcarray &options) { if(!combo) return; @@ -701,7 +701,7 @@ void MiniQtHelper::SetComboBoxOptions(QWidget *combo, const rdcarray &op comb->addItems(texts); } -size_t MiniQtHelper::GetComboBoxCount(QWidget *combo) +size_t MiniQtHelper::GetComboCount(QWidget *combo) { if(!combo) return 0; @@ -710,7 +710,7 @@ size_t MiniQtHelper::GetComboBoxCount(QWidget *combo) return comb->count(); } -void MiniQtHelper::SelectComboBoxOption(QWidget *combo, const rdcstr &option) +void MiniQtHelper::SelectComboOption(QWidget *combo, const rdcstr &option) { if(!combo) return; diff --git a/qrenderdoc/Code/MiniQtHelper.h b/qrenderdoc/Code/MiniQtHelper.h index ed812d6d3..b227b7fca 100644 --- a/qrenderdoc/Code/MiniQtHelper.h +++ b/qrenderdoc/Code/MiniQtHelper.h @@ -115,9 +115,9 @@ public: QWidget *CreateComboBox(bool editable, WidgetCallback changed) override; - void SetComboBoxOptions(QWidget *combo, const rdcarray &options) override; - size_t GetComboBoxCount(QWidget *combo) override; - void SelectComboBoxOption(QWidget *combo, const rdcstr &option) override; + void SetComboOptions(QWidget *combo, const rdcarray &options) override; + size_t GetComboCount(QWidget *combo) override; + void SelectComboOption(QWidget *combo, const rdcstr &option) override; private: ICaptureContext &m_Ctx; diff --git a/qrenderdoc/Windows/PythonShell.cpp b/qrenderdoc/Windows/PythonShell.cpp index 5e1c12e94..258340819 100644 --- a/qrenderdoc/Windows/PythonShell.cpp +++ b/qrenderdoc/Windows/PythonShell.cpp @@ -298,19 +298,19 @@ struct MiniQtInvoker : ObjectForwarder return InvokeRetFunction(&IMiniQtHelper::CreateComboBox, editable, changed); } - void SetComboBoxOptions(QWidget *combo, const rdcarray &options) + void SetComboOptions(QWidget *combo, const rdcarray &options) { - InvokeVoidFunction(&IMiniQtHelper::SetComboBoxOptions, combo, options); + InvokeVoidFunction(&IMiniQtHelper::SetComboOptions, combo, options); } - size_t GetComboBoxCount(QWidget *combo) + size_t GetComboCount(QWidget *combo) { - return InvokeRetFunction(&IMiniQtHelper::GetComboBoxCount, combo); + return InvokeRetFunction(&IMiniQtHelper::GetComboCount, combo); } - void SelectComboBoxOption(QWidget *combo, const rdcstr &option) + void SelectComboOption(QWidget *combo, const rdcstr &option) { - InvokeVoidFunction(&IMiniQtHelper::SelectComboBoxOption, combo, option); + InvokeVoidFunction(&IMiniQtHelper::SelectComboOption, combo, option); } };