From bdf1c4f671c706832cea84269e91995e85eb9f07 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Tue, 5 Feb 2019 20:30:43 +0100 Subject: QComboBox: add two new signals textHighlighted() and textActivated() To avoid overloaded signals for highlighted() and activated() add two new signals textHighlighted()/textActivated() and deprecate the old QString overloads. [ChangeLog][QtWidgets][QComboBox] Two new signals textHighlighted() and textActivated() were added to replace highlighted()/activated() QString overloads Change-Id: I62df7e606b335b5c756315a800654d7d0de442bd Reviewed-by: Shawn Rutledge --- src/widgets/widgets/qcombobox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/widgets/widgets/qcombobox.cpp') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 1ad43fffb4..aa520e37a2 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1364,7 +1364,10 @@ void QComboBoxPrivate::emitActivated(const QModelIndex &index) return; QString text(itemText(index)); emit q->activated(index.row()); + emit q->textActivated(text); +#if QT_DEPRECATED_SINCE(5, 15) emit q->activated(text); +#endif } void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index) @@ -1374,7 +1377,10 @@ void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index) return; QString text(itemText(index)); emit q->highlighted(index.row()); + emit q->textHighlighted(text); +#if QT_DEPRECATED_SINCE(5, 15) emit q->highlighted(text); +#endif } void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index) -- cgit v1.2.3