summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/uilib/properties.cpp
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/designer/src/lib/uilib/properties.cpp
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/designer/src/lib/uilib/properties.cpp')
-rw-r--r--tools/designer/src/lib/uilib/properties.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/designer/src/lib/uilib/properties.cpp b/tools/designer/src/lib/uilib/properties.cpp
index 615aa8a..b660dc4 100644
--- a/tools/designer/src/lib/uilib/properties.cpp
+++ b/tools/designer/src/lib/uilib/properties.cpp
@@ -78,7 +78,7 @@ QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta,
case DomProperty::String: {
const int index = meta->indexOfProperty(p->attributeName().toUtf8());
if (index != -1 && meta->property(index).type() == QVariant::KeySequence)
- return qVariantFromValue(QKeySequence(p->elementString()->text()));
+ return QVariant::fromValue(QKeySequence(p->elementString()->text()));
}
break;
@@ -96,7 +96,7 @@ QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta,
afb->setupColorGroup(palette, QPalette::Disabled, dom->elementDisabled());
palette.setCurrentColorGroup(QPalette::Active);
- return qVariantFromValue(palette);
+ return QVariant::fromValue(palette);
}
case DomProperty::Set: {
@@ -135,7 +135,7 @@ QVariant domPropertyToVariant(QAbstractFormBuilder *afb,const QMetaObject *meta,
return QVariant(e.keyToValue(enumValue.toUtf8()));
}
case DomProperty::Brush:
- return qVariantFromValue(afb->setupBrush(p->elementBrush()));
+ return QVariant::fromValue(afb->setupBrush(p->elementBrush()));
default:
if (afb->resourceBuilder()->isResourceProperty(p)) {
return afb->resourceBuilder()->loadResource(afb->workingDirectory(), p);
@@ -212,7 +212,7 @@ QVariant domPropertyToVariant(const DomProperty *p)
case DomProperty::Char: {
const DomChar *character = p->elementChar();
const QChar c(character->elementUnicode());
- return qVariantFromValue(c);
+ return QVariant::fromValue(c);
}
case DomProperty::Color: {
@@ -220,7 +220,7 @@ QVariant domPropertyToVariant(const DomProperty *p)
QColor c(color->elementRed(), color->elementGreen(), color->elementBlue());
if (color->hasAttributeAlpha())
c.setAlpha(color->attributeAlpha());
- return qVariantFromValue(c);
+ return QVariant::fromValue(c);
}
case DomProperty::Font: {
@@ -248,7 +248,7 @@ QVariant domPropertyToVariant(const DomProperty *p)
if (font->hasElementStyleStrategy()) {
f.setStyleStrategy(enumKeyOfObjectToValue<QAbstractFormBuilderGadget, QFont::StyleStrategy>("styleStrategy", font->elementStyleStrategy().toLatin1()));
}
- return qVariantFromValue(f);
+ return QVariant::fromValue(f);
}
case DomProperty::Date: {
@@ -275,15 +275,15 @@ QVariant domPropertyToVariant(const DomProperty *p)
#ifndef QT_NO_CURSOR
case DomProperty::Cursor:
- return qVariantFromValue(QCursor(static_cast<Qt::CursorShape>(p->elementCursor())));
+ return QVariant::fromValue(QCursor(static_cast<Qt::CursorShape>(p->elementCursor())));
case DomProperty::CursorShape:
- return qVariantFromValue(QCursor(enumKeyOfObjectToValue<QAbstractFormBuilderGadget, Qt::CursorShape>("cursorShape", p->elementCursorShape().toLatin1())));
+ return QVariant::fromValue(QCursor(enumKeyOfObjectToValue<QAbstractFormBuilderGadget, Qt::CursorShape>("cursorShape", p->elementCursorShape().toLatin1())));
#endif
case DomProperty::Locale: {
const DomLocale *locale = p->elementLocale();
- return qVariantFromValue(QLocale(enumKeyOfObjectToValue<QAbstractFormBuilderGadget, QLocale::Language>("language", locale->attributeLanguage().toLatin1()),
+ return QVariant::fromValue(QLocale(enumKeyOfObjectToValue<QAbstractFormBuilderGadget, QLocale::Language>("language", locale->attributeLanguage().toLatin1()),
enumKeyOfObjectToValue<QAbstractFormBuilderGadget, QLocale::Country>("country", locale->attributeCountry().toLatin1())));
}
case DomProperty::SizePolicy: {
@@ -309,7 +309,7 @@ QVariant domPropertyToVariant(const DomProperty *p)
sizePolicy.setVerticalPolicy(sp);
}
- return qVariantFromValue(sizePolicy);
+ return QVariant::fromValue(sizePolicy);
}
case DomProperty::StringList: