From 6bac3552acc5ec6e0e8594b31a04db10a21a88a4 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 23 Jan 2020 13:41:44 +0100 Subject: Convert two QDateTime::toString() usages to QLocale::toString() Qt::LocalDate has been deprecated for ages as an alias for Qt::SystemLocaleDate, which we intend to remove at Qt 6; and all use of them can (and should) be converted to use QLocale::toString(). So do that. Task-number: QTBUG-80441 Change-Id: I0a40fa287cb347c704ec3673d17ef18381063f7f Reviewed-by: Thiago Macieira --- src/widgets/itemviews/qdirmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/itemviews/qdirmodel.cpp') diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp index 13a1bbd8eb..3dea8bd405 100644 --- a/src/widgets/itemviews/qdirmodel.cpp +++ b/src/widgets/itemviews/qdirmodel.cpp @@ -1319,7 +1319,7 @@ QString QDirModelPrivate::type(const QModelIndex &index) const QString QDirModelPrivate::time(const QModelIndex &index) const { #if QT_CONFIG(datestring) - return node(index)->info.lastModified().toString(Qt::LocalDate); + return QLocale::system().toString(node(index)->info.lastModified(), QLocale::ShortFormat); #else Q_UNUSED(index); return QString(); -- cgit v1.2.3