diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-30 06:25:31 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-30 06:25:31 (GMT) |
commit | 08072b17a19bf9a99fbc8a494baa5528725fec1a (patch) | |
tree | 900485e613e11149b6138667ef2626bb869d0cc1 /src/gui/widgets | |
parent | c4f59859a589b76419e9133110eda850223f03dd (diff) | |
parent | b353f98da10f4b8b80f6be70951f147d580999e8 (diff) | |
download | Qt-08072b17a19bf9a99fbc8a494baa5528725fec1a.zip Qt-08072b17a19bf9a99fbc8a494baa5528725fec1a.tar.gz Qt-08072b17a19bf9a99fbc8a494baa5528725fec1a.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (23 commits)
Fix compile error on mingw.
MONILITY-645
Do not override alternate background color in Plastique
Fix QComboBox ignoring foreground role in some styles
Fix compilation on HP-UXi: _SC_MONOTONIC_CLOCK isn't defined
Fix compilation with Sun CC:
Ensure that we return QPair<long,long> in all cases.
Update PLATFORM(SPARC64) to CPU(SPARC64)
jui files are no c++ ...
scan some more file types by default
Support EtchDisabledText with spin box on Windows style
QNAM HTTP: Fix invoking a method when being destructed right now
Fixed a typo in the QDoubleValidotor doc.
Trivial fix to JavaScriptCore to fix building with MSVC 2010
Autotest: oops, fix oops: remove qguard from auto.pro
Autotests: oops, remove last traces of QGuard
Remove QGuard.
Unskip test that used to crash
QtScript: Add yet more missing API shims
QtScript: Make sure the old identifier table is restored
...
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 10 | ||||
-rw-r--r-- | src/gui/widgets/qvalidator.cpp | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index c16f18a..b1a27f2 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -108,7 +108,15 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt const QModelIndex &index) const { QStyleOptionMenuItem menuOption; - menuOption.palette = option.palette.resolve(QApplication::palette("QMenu")); + + QPalette resolvedpalette = option.palette.resolve(QApplication::palette("QMenu")); + QVariant value = index.data(Qt::ForegroundRole); + if (qVariantCanConvert<QBrush>(value)) { + resolvedpalette.setBrush(QPalette::WindowText, qvariant_cast<QBrush>(value)); + resolvedpalette.setBrush(QPalette::ButtonText, qvariant_cast<QBrush>(value)); + resolvedpalette.setBrush(QPalette::Text, qvariant_cast<QBrush>(value)); + } + menuOption.palette = resolvedpalette; menuOption.state = QStyle::State_None; if (mCombo->window()->isActiveWindow()) menuOption.state = QStyle::State_Active; diff --git a/src/gui/widgets/qvalidator.cpp b/src/gui/widgets/qvalidator.cpp index 0b5cc5a..b75db45 100644 --- a/src/gui/widgets/qvalidator.cpp +++ b/src/gui/widgets/qvalidator.cpp @@ -523,7 +523,7 @@ public: In addition, QDoubleValidator is always guaranteed to accept a number formatted according to the "C" locale. QDoubleValidator will not accept - numbers with thousand-seperators. + numbers with thousand-separators. \sa QIntValidator, QRegExpValidator, {Line Edits Example} */ |