summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/python/pythonwriteimports.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <[email protected]>2022-04-13 17:21:47 +0200
committerSona Kurazyan <[email protected]>2022-04-23 09:47:03 +0200
commitfedba8eaab464e9218afb4d11c7a77ddb5f09c40 (patch)
treeaeb9d0d978dd59bab4fb8c87ac7472a977479cf7 /src/tools/uic/python/pythonwriteimports.cpp
parent3aef84d6002016e6f764a0c2924bb5a802e9cb64 (diff)
uic: 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: I0d3c232a9fa95aea854445922f100b89c6d6f5a1 Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'src/tools/uic/python/pythonwriteimports.cpp')
-rw-r--r--src/tools/uic/python/pythonwriteimports.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/uic/python/pythonwriteimports.cpp b/src/tools/uic/python/pythonwriteimports.cpp
index 0d295b483d5..cceb0693143 100644
--- a/src/tools/uic/python/pythonwriteimports.cpp
+++ b/src/tools/uic/python/pythonwriteimports.cpp
@@ -81,7 +81,7 @@ static WriteImports::ClassesPerModule defaultClasses()
// module name "foo_rc" according to project conventions.
static QString pythonResource(QString resource)
{
- const int lastSlash = resource.lastIndexOf(QLatin1Char('/'));
+ const qsizetype lastSlash = resource.lastIndexOf(u'/');
if (lastSlash != -1)
resource.remove(0, lastSlash + 1);
if (resource.endsWith(QLatin1String(".qrc"))) {
@@ -223,7 +223,7 @@ void WriteImports::addPythonCustomWidget(const QString &className, const DomCust
} else { // When we do have elementHeader, we know it's a relative import.
QString modulePath = node->elementHeader()->text();
// Replace the '/' by '.'
- modulePath.replace(QLatin1Char('/'), QLatin1Char('.'));
+ modulePath.replace(u'/', u'.');
// '.h' is added by default on headers for <customwidget>
if (modulePath.endsWith(QLatin1String(".h")))
modulePath.chop(2);