summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-03-12 13:59:42 +0100
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-03-25 11:14:59 +0000
commit713e5e291443a5a308932d9476a7d930d4b59bc4 (patch)
tree79d5c43186c0aeb33ef1c9fd61b732b450650bd5 /src/widgets
parenta776a03e75ed82a66d84a7d0581824728b343c64 (diff)
QComboBox: use native popup on iOS
Enable native popup on iOS as well as OS X Change-Id: If99180a017768d9c94241adf2282ee9b3f69cbc1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcombobox.cpp10
-rw-r--r--src/widgets/widgets/qcombobox_p.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 17a036c5e4..7a8fcc2c76 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -93,7 +93,7 @@ QComboBoxPrivate::QComboBoxPrivate()
hoverControl(QStyle::SC_None),
autoCompletionCaseSensitivity(Qt::CaseInsensitive),
indexBeforeChange(-1)
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
, m_platformMenu(0)
#endif
#ifndef QT_NO_COMPLETER
@@ -104,7 +104,7 @@ QComboBoxPrivate::QComboBoxPrivate()
QComboBoxPrivate::~QComboBoxPrivate()
{
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
cleanupNativePopup();
#endif
}
@@ -2408,7 +2408,7 @@ QSize QComboBox::sizeHint() const
return d->recomputeSizeHint(d->sizeHint);
}
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
namespace {
struct IndexSetter {
@@ -2519,7 +2519,7 @@ void QComboBox::showPopup()
initStyleOption(&opt);
const bool usePopup = style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this);
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
if (usePopup
&& (!d->container
|| (view()->metaObject()->className() == QByteArray("QComboBoxListView")
@@ -2527,7 +2527,7 @@ void QComboBox::showPopup()
&& style->styleHint(QStyle::SH_ComboBox_UseNativePopup, &opt, this)
&& d->showNativePopup())
return;
-#endif // Q_OS_OSX
+#endif // Q_OS_MAC
#ifdef QT_KEYPAD_NAVIGATION
#ifndef QT_NO_COMPLETER
diff --git a/src/widgets/widgets/qcombobox_p.h b/src/widgets/widgets/qcombobox_p.h
index 88b360257f..580054780f 100644
--- a/src/widgets/widgets/qcombobox_p.h
+++ b/src/widgets/widgets/qcombobox_p.h
@@ -373,7 +373,7 @@ public:
void updateViewContainerPaletteAndOpacity();
void updateFocusPolicy();
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
void cleanupNativePopup();
bool showNativePopup();
#endif
@@ -403,7 +403,7 @@ public:
QPersistentModelIndex root;
Qt::CaseSensitivity autoCompletionCaseSensitivity;
int indexBeforeChange;
-#ifdef Q_OS_OSX
+#ifdef Q_OS_MAC
QPlatformMenu *m_platformMenu;
#endif
#ifndef QT_NO_COMPLETER