From 60ca2f5f7c38178cfe62d3dbe1b8dacfe43cbac9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 18 Jun 2019 20:11:18 +0200 Subject: Be less laissez-faire with implicit conversions to QChar QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: Ief5336f21e6d181e03ab92893b3d13a14adc7cb0 Reviewed-by: Volker Hilsheimer --- src/corelib/io/qurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qurl.cpp') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index d9ebc6c750..878e007fb0 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1010,7 +1010,7 @@ inline bool QUrlPrivate::setScheme(const QString &value, int len, bool doSetErro for (int i = needsLowercasing; i >= 0; --i) { ushort c = schemeData[i].unicode(); if (c >= 'A' && c <= 'Z') - schemeData[i] = c + 0x20; + schemeData[i] = QChar(c + 0x20); } } -- cgit v1.2.3