From c941a5bfc3b2972c5e5815e7c1720d56bedb178e Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Tue, 5 Apr 2022 12:19:37 +0800 Subject: [PATCH] clean code:remove old temporary fix --- wstring_qt.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/wstring_qt.cc b/wstring_qt.cc index aa9d9f6a..94febc69 100644 --- a/wstring_qt.cc +++ b/wstring_qt.cc @@ -10,17 +10,7 @@ namespace gd wstring toWString( QString const & in ) { - QVector< unsigned int > v = in.toUcs4(); - - // Fix for QString instance which contains non-BMP characters - // Qt will created unexpected null characters may confuse btree indexer. - // Related: https://bugreports.qt-project.org/browse/QTBUG-25536 - int n = v.size(); - while ( n > 0 && v[ n - 1 ] == 0 ) n--; - if ( n != v.size() ) - v.resize( n ); - - return wstring( ( const wchar * ) v.constData(), v.size() ); + return in.toStdU32String(); } wstring normalize( const wstring & str )