From d0a08d1f1176f00a8f3dde8dba49f139ab1e2535 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 13 Apr 2022 16:28:09 +0200 Subject: Android: stop using QLatin1Char constructor for creating char literals Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: Iebcbdbd7cecac09d0a7039e3ef6a4509d33039ba Reviewed-by: Assam Boudjelthia --- src/plugins/platforms/android/androidcontentfileengine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/android/androidcontentfileengine.cpp') diff --git a/src/plugins/platforms/android/androidcontentfileengine.cpp b/src/plugins/platforms/android/androidcontentfileengine.cpp index c5ead186c90..2be5614eafa 100644 --- a/src/plugins/platforms/android/androidcontentfileengine.cpp +++ b/src/plugins/platforms/android/androidcontentfileengine.cpp @@ -60,15 +60,15 @@ bool AndroidContentFileEngine::open(QIODevice::OpenMode openMode, Q_UNUSED(permissions); QString openModeStr; if (openMode & QFileDevice::ReadOnly) { - openModeStr += QLatin1Char('r'); + openModeStr += u'r'; } if (openMode & QFileDevice::WriteOnly) { - openModeStr += QLatin1Char('w'); + openModeStr += u'w'; } if (openMode & QFileDevice::Truncate) { - openModeStr += QLatin1Char('t'); + openModeStr += u't'; } else if (openMode & QFileDevice::Append) { - openModeStr += QLatin1Char('a'); + openModeStr += u'a'; } m_pfd = QJniObject::callStaticObjectMethod("org/qtproject/qt/android/QtNative", @@ -152,7 +152,7 @@ QString AndroidContentFileEngine::fileName(FileName f) const return m_file; case BaseName: { - const int pos = m_file.lastIndexOf(QChar(QLatin1Char('/'))); + const qsizetype pos = m_file.lastIndexOf(u'/'); return m_file.mid(pos); } default: -- cgit v1.2.3