summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/validators/localeselector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/validators/localeselector.cpp b/examples/widgets/validators/localeselector.cpp
index e4aae1a..0a48d66 100644
--- a/examples/widgets/validators/localeselector.cpp
+++ b/examples/widgets/validators/localeselector.cpp
@@ -294,7 +294,7 @@ LocaleSelector::LocaleSelector(QWidget *parent)
QString text = QLocale::languageToString(QLocale::Language(l.lang))
+ QLatin1Char('/')
+ QLocale::countryToString(QLocale::Country(l.country));
- addItem(text, qVariantFromValue(l));
+ addItem(text, QVariant::fromValue(l));
}
setCurrentIndex(curIndex);
@@ -307,6 +307,6 @@ void LocaleSelector::emitLocaleSelected(int index)
QVariant v = itemData(index);
if (!v.isValid())
return;
- SupportedLocale l = qVariantValue<SupportedLocale>(v);
+ SupportedLocale l = qvariant_cast<SupportedLocale>(v);
emit localeSelected(QLocale(QLocale::Language(l.lang), QLocale::Country(l.country)));
}