summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r--src/corelib/tools/qlocale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 890a8fb95d..72a6668bd3 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1834,7 +1834,7 @@ QTime QLocale::toTime(const QString &string, const QString &format) const
QTime time;
#ifndef QT_BOOTSTRAPPED
QDateTimeParser dt(QVariant::Time, QDateTimeParser::FromString);
- dt.defaultLocale = *this;
+ dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
dt.fromString(string, 0, &time);
#else
@@ -1865,7 +1865,7 @@ QDate QLocale::toDate(const QString &string, const QString &format) const
QDate date;
#ifndef QT_BOOTSTRAPPED
QDateTimeParser dt(QVariant::Date, QDateTimeParser::FromString);
- dt.defaultLocale = *this;
+ dt.setDefaultLocale(*this);
if (dt.parseFormat(format))
dt.fromString(string, &date, 0);
#else
@@ -1898,7 +1898,7 @@ QDateTime QLocale::toDateTime(const QString &string, const QString &format) cons
QDate date;
QDateTimeParser dt(QVariant::DateTime, QDateTimeParser::FromString);
- dt.defaultLocale = *this;
+ dt.setDefaultLocale(*this);
if (dt.parseFormat(format) && dt.fromString(string, &date, &time))
return QDateTime(date, time);
#else