diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-04 15:30:50 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-04 15:30:50 (GMT) |
commit | 254fe9c66cefb7be89f1e49111a115c2cdade1af (patch) | |
tree | 85496e62bb68b4cc36f1742eded09811f4ee46de | |
parent | c85d2aa7e8d095221e1cc2b4aac2dcd4e9dee775 (diff) | |
parent | 08d1eb4f79b9d633b97987cc55f618e6dd05e291 (diff) | |
download | Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.zip Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.tar.gz Qt-254fe9c66cefb7be89f1e49111a115c2cdade1af.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Fix combobox backgroundrole not respected in some styles
Allow QtDBus to be compiled as a static library on Windows.
-rw-r--r-- | src/dbus/qdbusmacros.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h index 5447c33..144e44e 100644 --- a/src/dbus/qdbusmacros.h +++ b/src/dbus/qdbusmacros.h @@ -48,8 +48,10 @@ #if defined(QDBUS_MAKEDLL) # define QDBUS_EXPORT Q_DECL_EXPORT -#else +#elif defined(QT_SHARED) # define QDBUS_EXPORT Q_DECL_IMPORT +#else +# define QDBUS_EXPORT #endif #ifndef Q_MOC_RUN diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 12b1c4a..664bb46 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -143,7 +143,10 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt menuOption.icon = qvariant_cast<QPixmap>(variant); 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("&&")); menuOption.tabWidth = 0; |