summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-05 20:30:43 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-23 07:18:43 +0000
commitbdf1c4f671c706832cea84269e91995e85eb9f07 (patch)
tree923a3cfe3ba648cd64ac7af55fc544efd2498321 /src/widgets/widgets/qcombobox.cpp
parent656ce9fa9dd1a5cb268f8e3225b2ed65c05365db (diff)
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 <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp6
1 files changed, 6 insertions, 0 deletions
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)