mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
clean code:remove old temporary fix
This commit is contained in:
parent
98367c83aa
commit
c941a5bfc3
|
@ -10,17 +10,7 @@ namespace gd
|
||||||
|
|
||||||
wstring toWString( QString const & in )
|
wstring toWString( QString const & in )
|
||||||
{
|
{
|
||||||
QVector< unsigned int > v = in.toUcs4();
|
return in.toStdU32String();
|
||||||
|
|
||||||
// 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() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wstring normalize( const wstring & str )
|
wstring normalize( const wstring & str )
|
||||||
|
|
Loading…
Reference in a new issue