diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-11 14:04:17 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-04-13 18:34:15 +0200 |
commit | a5b9600356cb8941a2d9685975b2454837b5e6ed (patch) | |
tree | efecf045643824fe74d088d4b8bb8302b014bf96 /src/gui/itemmodels/qfileinfogatherer.cpp | |
parent | 2e29f55f76e49c1fbffd2af51ec19d59b87f0e72 (diff) |
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 <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/gui/itemmodels/qfileinfogatherer.cpp')
-rw-r--r-- | src/gui/itemmodels/qfileinfogatherer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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)); } |