summaryrefslogtreecommitdiffstats
path: root/tools/shared
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-04 16:29:09 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-06 09:06:17 (GMT)
commit633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch)
tree1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /tools/shared
parent7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff)
downloadQt-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 'tools/shared')
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
index 15b0ced..948fa1e 100644
--- a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
+++ b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
@@ -549,7 +549,7 @@ void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, con
void QtVariantPropertyManagerPrivate::slotValueChanged(QtProperty *property, const QKeySequence &val)
{
QVariant v;
- qVariantSetValue(v, val);
+ v.setValue(val);
valueChanged(property, v);
}
@@ -636,7 +636,7 @@ void QtVariantPropertyManagerPrivate::slotEnumIconsChanged(QtProperty *property,
{
if (QtVariantProperty *varProp = m_internalToProperty.value(property, 0)) {
QVariant v;
- qVariantSetValue(v, enumIcons);
+ v.setValue(enumIcons);
emit q_ptr->attributeChanged(varProp, m_enumIconsAttribute, v);
}
}
@@ -1488,7 +1488,7 @@ QVariant QtVariantPropertyManager::attributeValue(const QtProperty *property, co
return enumManager->enumNames(internProp);
if (attribute == d_ptr->m_enumIconsAttribute) {
QVariant v;
- qVariantSetValue(v, enumManager->enumIcons(internProp));
+ v.setValue(enumManager->enumIcons(internProp));
return v;
}
return QVariant();
@@ -1568,73 +1568,73 @@ void QtVariantPropertyManager::setValue(QtProperty *property, const QVariant &va
QtAbstractPropertyManager *manager = internProp->propertyManager();
if (QtIntPropertyManager *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
- intManager->setValue(internProp, qVariantValue<int>(val));
+ intManager->setValue(internProp, qvariant_cast<int>(val));
return;
} else if (QtDoublePropertyManager *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
- doubleManager->setValue(internProp, qVariantValue<double>(val));
+ doubleManager->setValue(internProp, qvariant_cast<double>(val));
return;
} else if (QtBoolPropertyManager *boolManager = qobject_cast<QtBoolPropertyManager *>(manager)) {
- boolManager->setValue(internProp, qVariantValue<bool>(val));
+ boolManager->setValue(internProp, qvariant_cast<bool>(val));
return;
} else if (QtStringPropertyManager *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
- stringManager->setValue(internProp, qVariantValue<QString>(val));
+ stringManager->setValue(internProp, qvariant_cast<QString>(val));
return;
} else if (QtDatePropertyManager *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
- dateManager->setValue(internProp, qVariantValue<QDate>(val));
+ dateManager->setValue(internProp, qvariant_cast<QDate>(val));
return;
} else if (QtTimePropertyManager *timeManager = qobject_cast<QtTimePropertyManager *>(manager)) {
- timeManager->setValue(internProp, qVariantValue<QTime>(val));
+ timeManager->setValue(internProp, qvariant_cast<QTime>(val));
return;
} else if (QtDateTimePropertyManager *dateTimeManager = qobject_cast<QtDateTimePropertyManager *>(manager)) {
- dateTimeManager->setValue(internProp, qVariantValue<QDateTime>(val));
+ dateTimeManager->setValue(internProp, qvariant_cast<QDateTime>(val));
return;
} else if (QtKeySequencePropertyManager *keySequenceManager = qobject_cast<QtKeySequencePropertyManager *>(manager)) {
- keySequenceManager->setValue(internProp, qVariantValue<QKeySequence>(val));
+ keySequenceManager->setValue(internProp, qvariant_cast<QKeySequence>(val));
return;
} else if (QtCharPropertyManager *charManager = qobject_cast<QtCharPropertyManager *>(manager)) {
- charManager->setValue(internProp, qVariantValue<QChar>(val));
+ charManager->setValue(internProp, qvariant_cast<QChar>(val));
return;
} else if (QtLocalePropertyManager *localeManager = qobject_cast<QtLocalePropertyManager *>(manager)) {
- localeManager->setValue(internProp, qVariantValue<QLocale>(val));
+ localeManager->setValue(internProp, qvariant_cast<QLocale>(val));
return;
} else if (QtPointPropertyManager *pointManager = qobject_cast<QtPointPropertyManager *>(manager)) {
- pointManager->setValue(internProp, qVariantValue<QPoint>(val));
+ pointManager->setValue(internProp, qvariant_cast<QPoint>(val));
return;
} else if (QtPointFPropertyManager *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
- pointFManager->setValue(internProp, qVariantValue<QPointF>(val));
+ pointFManager->setValue(internProp, qvariant_cast<QPointF>(val));
return;
} else if (QtSizePropertyManager *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
- sizeManager->setValue(internProp, qVariantValue<QSize>(val));
+ sizeManager->setValue(internProp, qvariant_cast<QSize>(val));
return;
} else if (QtSizeFPropertyManager *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
- sizeFManager->setValue(internProp, qVariantValue<QSizeF>(val));
+ sizeFManager->setValue(internProp, qvariant_cast<QSizeF>(val));
return;
} else if (QtRectPropertyManager *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
- rectManager->setValue(internProp, qVariantValue<QRect>(val));
+ rectManager->setValue(internProp, qvariant_cast<QRect>(val));
return;
} else if (QtRectFPropertyManager *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
- rectFManager->setValue(internProp, qVariantValue<QRectF>(val));
+ rectFManager->setValue(internProp, qvariant_cast<QRectF>(val));
return;
} else if (QtColorPropertyManager *colorManager = qobject_cast<QtColorPropertyManager *>(manager)) {
- colorManager->setValue(internProp, qVariantValue<QColor>(val));
+ colorManager->setValue(internProp, qvariant_cast<QColor>(val));
return;
} else if (QtEnumPropertyManager *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
- enumManager->setValue(internProp, qVariantValue<int>(val));
+ enumManager->setValue(internProp, qvariant_cast<int>(val));
return;
} else if (QtSizePolicyPropertyManager *sizePolicyManager =
qobject_cast<QtSizePolicyPropertyManager *>(manager)) {
- sizePolicyManager->setValue(internProp, qVariantValue<QSizePolicy>(val));
+ sizePolicyManager->setValue(internProp, qvariant_cast<QSizePolicy>(val));
return;
} else if (QtFontPropertyManager *fontManager = qobject_cast<QtFontPropertyManager *>(manager)) {
- fontManager->setValue(internProp, qVariantValue<QFont>(val));
+ fontManager->setValue(internProp, qvariant_cast<QFont>(val));
return;
#ifndef QT_NO_CURSOR
} else if (QtCursorPropertyManager *cursorManager = qobject_cast<QtCursorPropertyManager *>(manager)) {
- cursorManager->setValue(internProp, qVariantValue<QCursor>(val));
+ cursorManager->setValue(internProp, qvariant_cast<QCursor>(val));
return;
#endif
} else if (QtFlagPropertyManager *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
- flagManager->setValue(internProp, qVariantValue<int>(val));
+ flagManager->setValue(internProp, qvariant_cast<int>(val));
return;
}
}
@@ -1672,69 +1672,69 @@ void QtVariantPropertyManager::setAttribute(QtProperty *property,
QtAbstractPropertyManager *manager = internProp->propertyManager();
if (QtIntPropertyManager *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
if (attribute == d_ptr->m_maximumAttribute)
- intManager->setMaximum(internProp, qVariantValue<int>(value));
+ intManager->setMaximum(internProp, qvariant_cast<int>(value));
else if (attribute == d_ptr->m_minimumAttribute)
- intManager->setMinimum(internProp, qVariantValue<int>(value));
+ intManager->setMinimum(internProp, qvariant_cast<int>(value));
else if (attribute == d_ptr->m_singleStepAttribute)
- intManager->setSingleStep(internProp, qVariantValue<int>(value));
+ intManager->setSingleStep(internProp, qvariant_cast<int>(value));
return;
} else if (QtDoublePropertyManager *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
if (attribute == d_ptr->m_maximumAttribute)
- doubleManager->setMaximum(internProp, qVariantValue<double>(value));
+ doubleManager->setMaximum(internProp, qvariant_cast<double>(value));
if (attribute == d_ptr->m_minimumAttribute)
- doubleManager->setMinimum(internProp, qVariantValue<double>(value));
+ doubleManager->setMinimum(internProp, qvariant_cast<double>(value));
if (attribute == d_ptr->m_singleStepAttribute)
- doubleManager->setSingleStep(internProp, qVariantValue<double>(value));
+ doubleManager->setSingleStep(internProp, qvariant_cast<double>(value));
if (attribute == d_ptr->m_decimalsAttribute)
- doubleManager->setDecimals(internProp, qVariantValue<int>(value));
+ doubleManager->setDecimals(internProp, qvariant_cast<int>(value));
return;
} else if (QtStringPropertyManager *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
if (attribute == d_ptr->m_regExpAttribute)
- stringManager->setRegExp(internProp, qVariantValue<QRegExp>(value));
+ stringManager->setRegExp(internProp, qvariant_cast<QRegExp>(value));
return;
} else if (QtDatePropertyManager *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
if (attribute == d_ptr->m_maximumAttribute)
- dateManager->setMaximum(internProp, qVariantValue<QDate>(value));
+ dateManager->setMaximum(internProp, qvariant_cast<QDate>(value));
if (attribute == d_ptr->m_minimumAttribute)
- dateManager->setMinimum(internProp, qVariantValue<QDate>(value));
+ dateManager->setMinimum(internProp, qvariant_cast<QDate>(value));
return;
} else if (QtPointFPropertyManager *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
if (attribute == d_ptr->m_decimalsAttribute)
- pointFManager->setDecimals(internProp, qVariantValue<int>(value));
+ pointFManager->setDecimals(internProp, qvariant_cast<int>(value));
return;
} else if (QtSizePropertyManager *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
if (attribute == d_ptr->m_maximumAttribute)
- sizeManager->setMaximum(internProp, qVariantValue<QSize>(value));
+ sizeManager->setMaximum(internProp, qvariant_cast<QSize>(value));
if (attribute == d_ptr->m_minimumAttribute)
- sizeManager->setMinimum(internProp, qVariantValue<QSize>(value));
+ sizeManager->setMinimum(internProp, qvariant_cast<QSize>(value));
return;
} else if (QtSizeFPropertyManager *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
if (attribute == d_ptr->m_maximumAttribute)
- sizeFManager->setMaximum(internProp, qVariantValue<QSizeF>(value));
+ sizeFManager->setMaximum(internProp, qvariant_cast<QSizeF>(value));
if (attribute == d_ptr->m_minimumAttribute)
- sizeFManager->setMinimum(internProp, qVariantValue<QSizeF>(value));
+ sizeFManager->setMinimum(internProp, qvariant_cast<QSizeF>(value));
if (attribute == d_ptr->m_decimalsAttribute)
- sizeFManager->setDecimals(internProp, qVariantValue<int>(value));
+ sizeFManager->setDecimals(internProp, qvariant_cast<int>(value));
return;
} else if (QtRectPropertyManager *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
if (attribute == d_ptr->m_constraintAttribute)
- rectManager->setConstraint(internProp, qVariantValue<QRect>(value));
+ rectManager->setConstraint(internProp, qvariant_cast<QRect>(value));
return;
} else if (QtRectFPropertyManager *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
if (attribute == d_ptr->m_constraintAttribute)
- rectFManager->setConstraint(internProp, qVariantValue<QRectF>(value));
+ rectFManager->setConstraint(internProp, qvariant_cast<QRectF>(value));
if (attribute == d_ptr->m_decimalsAttribute)
- rectFManager->setDecimals(internProp, qVariantValue<int>(value));
+ rectFManager->setDecimals(internProp, qvariant_cast<int>(value));
return;
} else if (QtEnumPropertyManager *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
if (attribute == d_ptr->m_enumNamesAttribute)
- enumManager->setEnumNames(internProp, qVariantValue<QStringList>(value));
+ enumManager->setEnumNames(internProp, qvariant_cast<QStringList>(value));
if (attribute == d_ptr->m_enumIconsAttribute)
- enumManager->setEnumIcons(internProp, qVariantValue<QtIconMap>(value));
+ enumManager->setEnumIcons(internProp, qvariant_cast<QtIconMap>(value));
return;
} else if (QtFlagPropertyManager *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
if (attribute == d_ptr->m_flagNamesAttribute)
- flagManager->setFlagNames(internProp, qVariantValue<QStringList>(value));
+ flagManager->setFlagNames(internProp, qvariant_cast<QStringList>(value));
return;
}
}