From 02e43e6fa6f47eaedc1dd72956569aa939d90981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 28 Aug 2019 16:56:18 +0200 Subject: widgets: Remove use of deprecated activated(const QString &) API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I71c6a10f6593ac28bf8f60d9db8d167cf88715cb Reviewed-by: Paul Olav Tvete Reviewed-by: Tor Arne Vestbø --- src/widgets/widgets/qcombobox.cpp | 15 --------------- src/widgets/widgets/qcombobox_p.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index a53c278aea..9a0e969e1c 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2539,21 +2539,6 @@ QSize QComboBox::sizeHint() const } #ifdef Q_OS_MAC - -namespace { -struct IndexSetter { - int index; - QComboBox *cb; - - void operator()(void) - { - cb->setCurrentIndex(index); - emit cb->activated(index); - emit cb->activated(cb->itemText(index)); - } -}; -} - void QComboBoxPrivate::cleanupNativePopup() { if (!m_platformMenu) diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h index eadb21628f..5967776a61 100644 --- a/src/widgets/widgets/qcombobox_p.h +++ b/src/widgets/widgets/qcombobox_p.h @@ -390,6 +390,16 @@ public: #ifdef Q_OS_MAC void cleanupNativePopup(); bool showNativePopup(); + struct IndexSetter { + int index; + QComboBox *cb; + + void operator()(void) + { + cb->setCurrentIndex(index); + cb->d_func()->emitActivated(cb->d_func()->currentIndex); + } + }; #endif QAbstractItemModel *model; -- cgit v1.2.3