From 490859cdc9bd7b1c61eea5e65e664a89262d1261 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 24 Apr 2020 23:18:29 +0200 Subject: [PATCH] QChar: fix missing warning for construction from char/uchar Commit eea219732ed79fde65c1074832fb80fdf62d4c30 added the explicit keyword to the QT_ASCII_CAST_WARN constructors of QChar, essentially disabling the intended warning for the char/uchar case, because the compiler would just pick another of the QChar ctors. Fix by removing the explicit keyword again. Change-Id: I65466426cfa471d44c3537fc47620ec8f0fcffcd Reviewed-by: Thiago Macieira --- src/corelib/text/qchar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qchar.h b/src/corelib/text/qchar.h index 8a616b4c73..82641ce2c9 100644 --- a/src/corelib/text/qchar.h +++ b/src/corelib/text/qchar.h @@ -115,9 +115,9 @@ public: #endif #ifndef QT_NO_CAST_FROM_ASCII - QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR explicit QChar(char c) noexcept : ucs(uchar(c)) { } + QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR QChar(char c) noexcept : ucs(uchar(c)) { } #ifndef QT_RESTRICTED_CAST_FROM_ASCII - QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR explicit QChar(uchar c) noexcept : ucs(c) { } + QT_ASCII_CAST_WARN Q_DECL_CONSTEXPR QChar(uchar c) noexcept : ucs(c) { } #endif #endif // Unicode information