summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2022-03-01 15:01:06 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2022-03-01 15:01:06 +0000
commit5ac45abbf68d6cc0ed66ab819462c1ab2867e9c0 (patch)
treeb725e2e808c447621fe0b99de68d7e43f8563572
parent4181481043da0d0c3535152318a87cc59f895275 (diff)
downloadVirtualBox-svn-5ac45abbf68d6cc0ed66ab819462c1ab2867e9c0.tar.gz
FE/Qt: qt6: The QButtonGroup::buttonClicked(int) signal was removed in qt6, leaving only the variant taking a QAbstractButton pointer (present in 5.0, possibly older). bugref:9898
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@94045 cfe28804-0f27-0410-a406-dd0f0b0b656f
-rw-r--r--src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp5
-rw-r--r--src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h3
-rw-r--r--src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp8
3 files changed, 12 insertions, 4 deletions
diff --git a/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp b/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
index 2dc3fd0c271..7a60892804e 100644
--- a/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
@@ -412,8 +412,9 @@ void UIVMLogViewerFilterPanel::sltClearFilterTerms()
m_pFilterTermsLineEdit->clearAll();
}
-void UIVMLogViewerFilterPanel::sltOperatorButtonChanged(int buttonId)
+void UIVMLogViewerFilterPanel::sltOperatorButtonChanged(QAbstractButton *pButton)
{
+ int buttonId = m_pButtonGroup->id(pButton);
if (buttonId < 0 || buttonId >= ButtonEnd)
return;
m_eFilterOperatorButton = static_cast<FilterOperatorButton>(buttonId);
@@ -552,7 +553,7 @@ void UIVMLogViewerFilterPanel::prepareRadioButtonGroup()
void UIVMLogViewerFilterPanel::prepareConnections()
{
connect(m_pAddFilterTermButton, &QIToolButton::clicked, this, &UIVMLogViewerFilterPanel::sltAddFilterTerm);
- connect(m_pButtonGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
+ connect(m_pButtonGroup, static_cast<void (QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
this, &UIVMLogViewerFilterPanel::sltOperatorButtonChanged);
connect(m_pFilterComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
this, &UIVMLogViewerFilterPanel::sltAddFilterTerm);
diff --git a/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h b/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h
index 6290b9079e6..00425d5aa91 100644
--- a/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h
+++ b/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h
@@ -28,6 +28,7 @@
#include "UIVMLogViewerPanel.h"
/* Forward declarations: */
+class QAbstractButton;
class QButtonGroup;
class QComboBox;
class QFrame;
@@ -78,7 +79,7 @@ private slots:
/** Clear all the filter terms and reset the filtering. */
void sltClearFilterTerms();
/** Executes the necessary code to handle filter's boolean operator change ('And', 'Or'). */
- void sltOperatorButtonChanged(int buttonId);
+ void sltOperatorButtonChanged(QAbstractButton *pButton);
void sltRemoveFilterTerm(const QString &termString);
private:
diff --git a/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp b/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
index 8475998e7c7..bac29a98287 100644
--- a/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
@@ -625,12 +625,18 @@ void UIDiskFormatsGroupBox::createFormatWidgets()
}
setMediumFormat(m_formatList[0].m_comFormat);
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ connect(m_pFormatButtonGroup, static_cast<void(QButtonGroup::*)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ this, &UIDiskFormatsGroupBox::sigMediumFormatChanged);
+#else
connect(m_pFormatButtonGroup, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
this, &UIDiskFormatsGroupBox::sigMediumFormatChanged);
+#endif
}
+
/*********************************************************************************************************************************
-* UIDiskFormatsGroupBox implementation. *
+* UIDiskFormatsGroupBox implementation. *
*********************************************************************************************************************************/
UIDiskFormatsComboBox::UIDiskFormatsComboBox(bool fExpertMode, KDeviceType enmDeviceType, QWidget *pParent /* = 0 */)