summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qlocale_unix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qlocale_unix.cpp')
-rw-r--r--src/corelib/text/qlocale_unix.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/corelib/text/qlocale_unix.cpp b/src/corelib/text/qlocale_unix.cpp
index ff4274d932..207331b8ac 100644
--- a/src/corelib/text/qlocale_unix.cpp
+++ b/src/corelib/text/qlocale_unix.cpp
@@ -234,16 +234,16 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
case CurrencySymbol:
return lc_monetary.currencySymbol(QLocale::CurrencySymbolFormat(in.toUInt()));
case CurrencyToString: {
- switch (in.type()) {
- case QVariant::Int:
+ switch (in.userType()) {
+ case QMetaType::Int:
return lc_monetary.toCurrencyString(in.toInt());
- case QVariant::UInt:
+ case QMetaType::UInt:
return lc_monetary.toCurrencyString(in.toUInt());
- case QVariant::Double:
+ case QMetaType::Double:
return lc_monetary.toCurrencyString(in.toDouble());
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return lc_monetary.toCurrencyString(in.toLongLong());
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
return lc_monetary.toCurrencyString(in.toULongLong());
default:
break;
@@ -283,9 +283,9 @@ QVariant QSystemLocale::query(QueryType type, QVariant in) const
return d->uiLanguages.isEmpty() ? QVariant() : QVariant(d->uiLanguages);
}
case StringToStandardQuotation:
- return lc_messages.quoteString(in.value<QStringRef>());
+ return lc_messages.quoteString(qvariant_cast<QStringRef>(in));
case StringToAlternateQuotation:
- return lc_messages.quoteString(in.value<QStringRef>(), QLocale::AlternateQuotation);
+ return lc_messages.quoteString(qvariant_cast<QStringRef>(in), QLocale::AlternateQuotation);
case ListToSeparatedString:
return lc_messages.createSeparatedList(in.toStringList());
case LocaleChanged: