From 329e3d4ec463349322568c0d8ff9a5141b8c045d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Mar 2019 12:55:18 +0100 Subject: [PATCH] QComboxBox: Silence warnings about deprecated API Fix: widgets/qcombobox.cpp: In member function 'void QComboBoxPrivate::emitActivated(const QModelIndex&)': widgets/qcombobox.cpp:1369:22: warning: 'void QComboBox::activated(const QString&)' is deprecated: Use textActivated() instead [-Wdeprecated-declarations] In file included from widgets/qcombobox.cpp:40:0: widgets/qcombobox.h:234:10: note: declared here widgets/qcombobox.cpp: In member function 'void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex&)': widgets/qcombobox.cpp:1382:24: warning: 'void QComboBox::highlighted(const QString&)' is deprecated: Use textHighlighted() instead [-Wdeprecated-declarations] Change-Id: I11bdbbeeaa05f1e1bd91351eba329ce9895951f9 Reviewed-by: Christian Ehrlicher --- src/widgets/widgets/qcombobox.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index fa000761ec..7e29a417ea 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1366,7 +1366,10 @@ void QComboBoxPrivate::emitActivated(const QModelIndex &index) emit q->activated(index.row()); emit q->textActivated(text); #if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->activated(text); +QT_WARNING_POP #endif } @@ -1379,7 +1382,10 @@ void QComboBoxPrivate::_q_emitHighlighted(const QModelIndex &index) emit q->highlighted(index.row()); emit q->textHighlighted(text); #if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED emit q->highlighted(text); +QT_WARNING_POP #endif }