From f5117f0a84958defd11c337e512bd0a32bc9efca Mon Sep 17 00:00:00 2001 From: hyzboy Date: Thu, 16 Jul 2020 11:59:02 +0800 Subject: [PATCH] add u8char support in QTString.h --- inc/hgl/type/QTString.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/hgl/type/QTString.h b/inc/hgl/type/QTString.h index 395f881..4610011 100644 --- a/inc/hgl/type/QTString.h +++ b/inc/hgl/type/QTString.h @@ -17,7 +17,7 @@ { QByteArray u8str=str.toUtf8(); - return hgl::UTF8String(u8str.data(),u8str.size()); + return hgl::UTF8String((hgl::u8char *)u8str.data(),u8str.size()); } inline hgl::WideString ToOSString(const QString &str) @@ -26,7 +26,7 @@ QByteArray u8str=str.toUtf8(); - return hgl::to_u16(u8str.data(),u8str.size()); + return hgl::to_u16((hgl::u8char *)u8str.data(),u8str.size()); } #else template QString WCharToQString(const wchar_t *,int); @@ -62,7 +62,7 @@ inline QString toQString(const hgl::UTF8String &str) { - return QString::fromUtf8(str.c_str(),str.Length()); + return QString::fromUtf8((char *)str.c_str(),str.Length()); } // inline QString toQString(const hgl::UTF32String &str)