From 63b042fb219a42194485e152acf6d305e4594c5c Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 25 Apr 2022 14:10:21 +0200 Subject: QtWidgets: 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: I133b80334b66e0a5ab9546dd8e1ff0631e79601e Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qtextbrowser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/widgets/qtextbrowser.cpp') diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp index 9ab1635e1d..b070598f81 100644 --- a/src/widgets/widgets/qtextbrowser.cpp +++ b/src/widgets/widgets/qtextbrowser.cpp @@ -189,8 +189,8 @@ QString QTextBrowserPrivate::findFile(const QUrl &name) const return fileName; for (QString path : qAsConst(searchPaths)) { - if (!path.endsWith(QLatin1Char('/'))) - path.append(QLatin1Char('/')); + if (!path.endsWith(u'/')) + path.append(u'/'); path.append(fileName); if (QFileInfo(path).isReadable()) return path; @@ -336,7 +336,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url, QTextDocument::ResourceType qWarning("QTextBrowser: No document for %s", url.toString().toLatin1().constData()); if (q->isVisible()) { - const QStringView firstTag = QStringView{txt}.left(txt.indexOf(QLatin1Char('>')) + 1); + const QStringView firstTag = QStringView{txt}.left(txt.indexOf(u'>') + 1); if (firstTag.startsWith(QLatin1String("