Fix compilation with QT_RESTRICTED_CAST_FROM_ASCII

Fix the QString constructor used for restricted casts
from char *.

Change-Id: Id7e71f6d0bcd4627bb44b2bd6d6790be2b6ed976
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
This commit is contained in:
Lars Knoll 2020-04-06 14:53:50 +02:00
parent 83f5c3c26a
commit 0b12b7f518

View File

@ -804,7 +804,7 @@ public:
#if defined(QT_RESTRICTED_CAST_FROM_ASCII)
template <int N>
inline QString(const char (&ch)[N])
: d(fromAscii_helper(ch, N - 1))
: QString(fromUtf8(ch))
{}
template <int N>
QString(char (&)[N]) = delete;