Index: trunk/src/gui/widgets/qcombobox.cpp
===================================================================
--- trunk/src/gui/widgets/qcombobox.cpp	(revision 651)
+++ trunk/src/gui/widgets/qcombobox.cpp	(revision 769)
@@ -77,4 +77,8 @@
 # include <private/qeffects_p.h>
 #endif
+#if defined(Q_WS_S60)
+#include "private/qt_s60_p.h"
+#endif
+
 QT_BEGIN_NAMESPACE
 
@@ -140,5 +144,8 @@
         break;
     }
-
+    if (qVariantCanConvert<QBrush>(index.data(Qt::BackgroundRole))) {
+        menuOption.palette.setBrush(QPalette::All, QPalette::Background,
+                                    qvariant_cast<QBrush>(index.data(Qt::BackgroundRole)));
+    }
     menuOption.text = index.model()->data(index, Qt::DisplayRole).toString()
                            .replace(QLatin1Char('&'), QLatin1String("&&"));
@@ -533,6 +540,8 @@
     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) ||
@@ -608,5 +617,11 @@
                                combo->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, combo));
         setFrameStyle(combo->style()->styleHint(QStyle::SH_ComboBox_PopupFrameStyle, &opt, combo));
-    }
+#ifdef QT_SOFTKEYS_ENABLED
+    } else if (e->type() == QEvent::LanguageChange) {
+        selectAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::SelectSoftKey));
+        cancelAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::CancelSoftKey));
+#endif
+    }
+
     QWidget::changeEvent(e);
 }
@@ -2411,4 +2426,5 @@
         listRect.moveLeft(above.x());
 
+#ifndef Q_WS_S60
         // Position vertically so the curently selected item lines up
         // with the combo box.
@@ -2416,4 +2432,5 @@
         const int offset = listRect.top() - currentItemRect.top();
         listRect.moveTop(above.y() + offset - listRect.top());
+#endif
 
 
@@ -2422,5 +2439,11 @@
         // important to show as much as possible of the popup.
         const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height());
+#ifdef Q_WS_S60
+        //popup needs to be stretched with screen minimum dimension
+        listRect.setHeight(qMin(screen.height(), screen.width()));
+#else
         listRect.setHeight(height);
+#endif
+
         if (boundToScreen) {
             if (listRect.top() < screen.top())
@@ -2429,4 +2452,21 @@
                 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()) {
+                // 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);
@@ -2637,4 +2677,37 @@
             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)) {
+                const QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this));
+
+                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()) {
+                        // 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;
