widgets: Remove use of deprecated activated(const QString &) API

Change-Id: I71c6a10f6593ac28bf8f60d9db8d167cf88715cb
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-08-28 16:56:18 +02:00
parent 4534522ff0
commit 02e43e6fa6
2 changed files with 10 additions and 15 deletions

View File

@ -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)

View File

@ -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;