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:
parent
4534522ff0
commit
02e43e6fa6
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user