summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qbuttongroup.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-01-25 20:43:13 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-01-28 06:24:25 +0100
commitfb7c9dfc060a09b4b1fa6d474f106bb6c1d2d4df (patch)
treec083bd67b4a1a3abb6e90221cb8a69b4314c1c75 /src/widgets/widgets/qbuttongroup.h
parent4bb897a3841f0f79150787e29fe122e1410bc119 (diff)
QButtonGroup: deprecate overloaded signals
Deprecate the overloaded signals buttonClicked/buttonPressed/buttonReleased/buttonToggled taking an int to avoid to need to use QOverload<> when connecting the signal. The id of a button in a button group can be easily fetched with QButtonGroup::id(). Task-number: QTBUG-80906 Change-Id: Idaaab54bbcb25cba543fc99f305b9f4743ee3ed8 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qbuttongroup.h')
-rw-r--r--src/widgets/widgets/qbuttongroup.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/widgets/widgets/qbuttongroup.h b/src/widgets/widgets/qbuttongroup.h
index fec94ccb3e..2989dcb4ba 100644
--- a/src/widgets/widgets/qbuttongroup.h
+++ b/src/widgets/widgets/qbuttongroup.h
@@ -78,13 +78,19 @@ public:
Q_SIGNALS:
void buttonClicked(QAbstractButton *);
- void buttonClicked(int);
void buttonPressed(QAbstractButton *);
- void buttonPressed(int);
void buttonReleased(QAbstractButton *);
- void buttonReleased(int);
void buttonToggled(QAbstractButton *, bool);
+#if QT_DEPRECATED_SINCE(5, 15)
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonClicked(QAbstractButton *) instead")
+ void buttonClicked(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonPressed(QAbstractButton *) instead")
+ void buttonPressed(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonReleased(QAbstractButton *) instead")
+ void buttonReleased(int);
+ QT_DEPRECATED_VERSION_X_5_15("Use QButtonGroup::buttonToggled(QAbstractButton *, bool) instead")
void buttonToggled(int, bool);
+#endif
private:
Q_DISABLE_COPY(QButtonGroup)