From a5b9600356cb8941a2d9685975b2454837b5e6ed Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 11 Apr 2022 14:04:17 +0200 Subject: QtGui: stop using QLatin1Char constructor for creating char literals Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I308d86cefcbfd126929b68f9a853d420840c965f Reviewed-by: Qt CI Bot Reviewed-by: Marc Mutz --- src/gui/itemmodels/qfileinfogatherer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/itemmodels/qfileinfogatherer.cpp') diff --git a/src/gui/itemmodels/qfileinfogatherer.cpp b/src/gui/itemmodels/qfileinfogatherer.cpp index ec4ae2269b..1ed693859c 100644 --- a/src/gui/itemmodels/qfileinfogatherer.cpp +++ b/src/gui/itemmodels/qfileinfogatherer.cpp @@ -68,9 +68,9 @@ static QString translateDriveName(const QFileInfo &drive) { QString driveName = drive.absoluteFilePath(); #ifdef Q_OS_WIN - if (driveName.startsWith(QLatin1Char('/'))) // UNC host + if (driveName.startsWith(u'/')) // UNC host return drive.fileName(); - if (driveName.endsWith(QLatin1Char('/'))) + if (driveName.endsWith(u'/')) driveName.chop(1); #endif // Q_OS_WIN return driveName; @@ -176,7 +176,7 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr */ void QFileInfoGatherer::updateFile(const QString &filePath) { - QString dir = filePath.mid(0, filePath.lastIndexOf(QLatin1Char('/'))); + QString dir = filePath.mid(0, filePath.lastIndexOf(u'/')); QString fileName = filePath.mid(dir.length() + 1); fetchExtendedInformation(dir, QStringList(fileName)); } -- cgit v1.2.3