diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-04 16:29:09 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-06 09:06:17 (GMT) |
commit | 633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch) | |
tree | 1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /src/gui/widgets/qcombobox.cpp | |
parent | 7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff) | |
download | Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.zip Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.gz Qt-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.bz2 |
Remove the use of deprecated qVariant*
Test directory untouched.
This just apply those regexp:
git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue
git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue
git checkout src/corelib/kernal/qvariant*
Rev-by: dev mailing list
Diffstat (limited to 'src/gui/widgets/qcombobox.cpp')
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 88b3467..bb2da9a 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -116,7 +116,7 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt QPalette resolvedpalette = option.palette.resolve(QApplication::palette("QMenu")); QVariant value = index.data(Qt::ForegroundRole); - if (qVariantCanConvert<QBrush>(value)) { + if (value.canConvert<QBrush>()) { resolvedpalette.setBrush(QPalette::WindowText, qvariant_cast<QBrush>(value)); resolvedpalette.setBrush(QPalette::ButtonText, qvariant_cast<QBrush>(value)); resolvedpalette.setBrush(QPalette::Text, qvariant_cast<QBrush>(value)); @@ -152,7 +152,7 @@ QStyleOptionMenuItem QComboMenuDelegate::getStyleOption(const QStyleOptionViewIt menuOption.icon = qvariant_cast<QPixmap>(variant); break; } - if (qVariantCanConvert<QBrush>(index.data(Qt::BackgroundRole))) { + if (index.data(Qt::BackgroundRole).canConvert<QBrush>()) { menuOption.palette.setBrush(QPalette::All, QPalette::Background, qvariant_cast<QBrush>(index.data(Qt::BackgroundRole))); } |