diff options
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r-- | src/widgets/widgets/qcombobox.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 32780a07b3..56a59953bd 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -74,9 +74,6 @@ #ifndef QT_NO_EFFECTS # include <private/qeffects_p.h> #endif -#if defined(Q_WS_S60) -#include "private/qt_s60_p.h" -#endif #ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" #endif @@ -549,11 +546,9 @@ void QComboBoxPrivateContainer::setItemView(QAbstractItemView *itemView) QStyleOptionComboBox opt = comboStyleOption(); const bool usePopup = combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo); #ifndef QT_NO_SCROLLBAR -#ifndef Q_WS_S60 if (usePopup) view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #endif -#endif if (combo->style()->styleHint(QStyle::SH_ComboBox_ListMouseTracking, &opt, combo) || usePopup) { view->setMouseTracking(true); @@ -2339,11 +2334,7 @@ void QComboBox::showPopup() initStyleOption(&opt); QRect listRect(style->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxListBoxPopup, this)); -#ifndef Q_WS_S60 QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this)); -#else - QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect()); -#endif QPoint below = mapToGlobal(listRect.bottomLeft()); int belowHeight = screen.bottom() - below.y(); @@ -2436,14 +2427,11 @@ void QComboBox::showPopup() // Position horizontally. listRect.moveLeft(above.x()); -#ifndef Q_WS_S60 // Position vertically so the curently selected item lines up // with the combo box. const QRect currentItemRect = view()->visualRect(view()->currentIndex()); const int offset = listRect.top() - currentItemRect.top(); listRect.moveTop(above.y() + offset - listRect.top()); -#endif - // Clamp the listRect height and vertical position so we don't expand outside the // available screen geometry.This may override the vertical position, but it is more @@ -2457,23 +2445,6 @@ void QComboBox::showPopup() if (listRect.bottom() > screen.bottom()) listRect.moveBottom(screen.bottom()); } -#ifdef Q_WS_S60 - if (screen.width() < screen.height()) { - // in portait, menu should be positioned above softkeys - listRect.moveBottom(screen.bottom()); - } else { - TRect staConTopRect = TRect(); - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect); - listRect.setWidth(listRect.height()); - //by default popup is centered on screen in landscape - listRect.moveCenter(screen.center()); - if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) { - // landscape without stacon, menu should be at the right - (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : - listRect.setLeft(screen.left()); - } - } -#endif } else if (!boundToScreen || listRect.height() <= belowHeight) { listRect.moveTopLeft(below); } else if (listRect.height() <= aboveHeight) { @@ -2692,39 +2663,6 @@ void QComboBox::changeEvent(QEvent *e) d->updateLineEditGeometry(); d->setLayoutItemMargins(QStyle::SE_ComboBoxLayoutItem); -#ifdef Q_WS_S60 - if (d->container) { - QStyleOptionComboBox opt; - initStyleOption(&opt); - - if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) { - QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect()); - - QRect listRect(style()->subControlRect(QStyle::CC_ComboBox, &opt, - QStyle::SC_ComboBoxListBoxPopup, this)); - listRect.setHeight(qMin(screen.height(), screen.width())); - - if (screen.width() < screen.height()) { - // in portait, menu should be positioned above softkeys - listRect.moveBottom(screen.bottom()); - } else { - TRect staConTopRect = TRect(); - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect); - listRect.setWidth(listRect.height()); - //by default popup is centered on screen in landscape - listRect.moveCenter(screen.center()); - if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) { - // landscape without stacon, menu should be at the right - (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) : - listRect.setLeft(screen.left()); - } - } - - d->container->setGeometry(listRect); - } - } -#endif - // ### need to update scrollers etc. as well here break; case QEvent::EnabledChange: @@ -2753,10 +2691,6 @@ void QComboBox::changeEvent(QEvent *e) void QComboBox::resizeEvent(QResizeEvent *) { Q_D(QComboBox); -#ifdef Q_WS_S60 - if (d->viewContainer() && d->viewContainer()->isVisible()) - showPopup(); -#endif d->updateLineEditGeometry(); } |