aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/jsextensions/propertylistutils.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/jsextensions/propertylistutils.mm')
-rw-r--r--src/lib/corelib/jsextensions/propertylistutils.mm28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/corelib/jsextensions/propertylistutils.mm b/src/lib/corelib/jsextensions/propertylistutils.mm
index b8ae1b8e0..704b1a8ce 100644
--- a/src/lib/corelib/jsextensions/propertylistutils.mm
+++ b/src/lib/corelib/jsextensions/propertylistutils.mm
@@ -127,33 +127,33 @@ static NSArray *toArray(const QVariantList &list);
static id toObject(const QVariant &variant)
{
- if (variant.type() == QVariant::Hash) {
+ if (variant.userType() == QMetaType::QVariantHash) {
return toDictionary(qHashToMap(variant.toHash()));
- } else if (variant.type() == QVariant::Map) {
+ } else if (variant.userType() == QMetaType::QVariantMap) {
return toDictionary(variant.toMap());
- } else if (variant.type() == QVariant::List) {
+ } else if (variant.userType() == QMetaType::QVariantList) {
return toArray(variant.toList());
- } else if (variant.type() == QVariant::String) {
+ } else if (variant.userType() == QMetaType::QString) {
return variant.toString().toNSString();
- } else if (variant.type() == QVariant::ByteArray) {
+ } else if (variant.userType() == QMetaType::QByteArray) {
return variant.toByteArray().toNSData();
- } else if (variant.type() == QVariant::Date ||
- variant.type() == QVariant::DateTime) {
+ } else if (variant.userType() == QMetaType::QDate ||
+ variant.userType() == QMetaType::QDateTime) {
return variant.toDateTime().toNSDate();
- } else if (variant.type() == QVariant::Bool) {
+ } else if (variant.userType() == QMetaType::Bool) {
return variant.toBool()
? [NSNumber numberWithBool:YES]
: [NSNumber numberWithBool:NO];
- } else if (variant.type() == QVariant::Char ||
- variant.type() == QVariant::Int) {
+ } else if (variant.userType() == QMetaType::Char ||
+ variant.userType() == QMetaType::Int) {
return [NSNumber numberWithInt:variant.toInt()];
- } else if (variant.type() == QVariant::UInt) {
+ } else if (variant.userType() == QMetaType::UInt) {
return [NSNumber numberWithUnsignedInt:variant.toUInt()];
- } else if (variant.type() == QVariant::LongLong) {
+ } else if (variant.userType() == QMetaType::LongLong) {
return [NSNumber numberWithLongLong:variant.toLongLong()];
- } else if (variant.type() == QVariant::ULongLong) {
+ } else if (variant.userType() == QMetaType::ULongLong) {
return [NSNumber numberWithUnsignedLongLong:variant.toULongLong()];
- } else if (variant.type() == QVariant::Double) {
+ } else if (variant.userType() == QMetaType::Double) {
return [NSNumber numberWithDouble:variant.toDouble()];
} else {
return [NSNull null];