summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-28 08:42:51 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-28 08:42:51 (GMT)
commitcb821260e092679320c759406b503a4a44db998f (patch)
treeb1a69255b2f3908c1fca6038d31f462ca0adb574 /src/gui/widgets/qcombobox.cpp
parente6767a4bd15f001df6927d7232598662977bea13 (diff)
parent1583d643285641bf71e6a107331d788acca9850c (diff)
downloadQt-cb821260e092679320c759406b503a4a44db998f.zip
Qt-cb821260e092679320c759406b503a4a44db998f.tar.gz
Qt-cb821260e092679320c759406b503a4a44db998f.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/widgets/qcombobox.cpp')
-rw-r--r--src/gui/widgets/qcombobox.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index 05e1e74..ae56d36 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -402,13 +402,6 @@ QComboBoxPrivateContainer::QComboBoxPrivateContainer(QAbstractItemView *itemView
layout->setSpacing(0);
layout->setMargin(0);
-#ifdef QT_SOFTKEYS_ENABLED
- selectAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::SelectSoftKey, Qt::Key_Select, this);
- cancelAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::CancelSoftKey, Qt::Key_Escape, this);
- addAction(selectAction);
- addAction(cancelAction);
-#endif
-
// set item view
setItemView(itemView);
@@ -572,6 +565,13 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView)
this, SLOT(setCurrentIndex(QModelIndex)));
connect(view, SIGNAL(destroyed()),
this, SLOT(viewDestroyed()));
+
+#ifdef QT_SOFTKEYS_ENABLED
+ selectAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::SelectSoftKey, Qt::Key_Select, itemView);
+ cancelAction = QSoftKeyManager::createKeyedAction(QSoftKeyManager::CancelSoftKey, Qt::Key_Escape, itemView);
+ addAction(selectAction);
+ addAction(cancelAction);
+#endif
}
/*!
@@ -2452,15 +2452,15 @@ void QComboBox::showPopup()
#if defined(Q_WS_WIN) && !defined(QT_NO_EFFECTS)
bool scrollDown = (listRect.topLeft() == below);
- if (QApplication::isEffectEnabled(Qt::UI_AnimateCombo)
+ if (QApplication::isEffectEnabled(Qt::UI_AnimateCombo)
&& !style->styleHint(QStyle::SH_ComboBox_Popup, &opt, this) && !window()->testAttribute(Qt::WA_DontShowOnScreen))
qScrollEffect(container, scrollDown ? QEffects::DownScroll : QEffects::UpScroll, 150);
#endif
// Don't disable updates on Mac OS X. Windows are displayed immediately on this platform,
// which means that the window will be visible before the call to container->show() returns.
-// If updates are disabled at this point we'll miss our chance at painting the popup
-// menu before it's shown, causing flicker since the window then displays the standard gray
+// If updates are disabled at this point we'll miss our chance at painting the popup
+// menu before it's shown, causing flicker since the window then displays the standard gray
// background.
#ifndef Q_WS_MAC
container->setUpdatesEnabled(false);