summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/stringutil.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/backend/stringutil.cpp b/library/backend/stringutil.cpp
index b5fbd3e..f1ad1b9 100644
--- a/library/backend/stringutil.cpp
+++ b/library/backend/stringutil.cpp
@@ -56,21 +56,21 @@ static const char collationHack[] = {
560x14, //C-T 560x14, //C-T
570x15, //C-U 570x15, //C-U
580x16, //C-V 580x16, //C-V
590x17, //C-W 590x17, //C-W
600x18, //C-X 600x18, //C-X
610x19, //C-Y 610x19, //C-Y
620x1a, //C-Z 620x1a, //C-Z
630x1b, //C-[ 630x1b, //C-[
640x1c, //C-\ 640x1c, /* C-\ */
650x1d, //C-] 650x1d, //C-]
660x1e, //C-^ 660x1e, //C-^
670x1f, //C-_ 670x1f, //C-_
68' ', // 68' ', //
69'!', //! 69'!', //!
70'"', //" 70'"', //"
71'#', //# 71'#', //#
72'$', //$ 72'$', //$
73'%', //% 73'%', //%
74'&', //& 74'&', //&
75'\'', //' 75'\'', //'
76'(', //( 76'(', //(
@@ -120,17 +120,17 @@ static const char collationHack[] = {
120'T', //T 120'T', //T
121'U', //U 121'U', //U
122'V', //V 122'V', //V
123'W', //W 123'W', //W
124'X', //X 124'X', //X
125'Y', //Y 125'Y', //Y
126'Z', //Z 126'Z', //Z
127'[', //[ 127'[', //[
128'\\', //\ 128'\\', /* \ */
129']', //] 129']', //]
130'^', //^ 130'^', //^
131'_', //_ 131'_', //_
132'`', //` 132'`', //`
133'A', //a 133'A', //a
134'B', //b 134'B', //b
135'C', //c 135'C', //c
136'D', //d 136'D', //d
@@ -184,17 +184,17 @@ static const char collationHack[] = {
1840x94, //C-M-T 1840x94, //C-M-T
1850x95, //C-M-U 1850x95, //C-M-U
1860x96, //C-M-V 1860x96, //C-M-V
1870x97, //C-M-W 1870x97, //C-M-W
1880x98, //C-M-X 1880x98, //C-M-X
1890x99, //C-M-Y 1890x99, //C-M-Y
1900x9a, //C-M-Z 1900x9a, //C-M-Z
1910x9b, //C-M-[ 1910x9b, //C-M-[
1920x9c, //C-M-\ 1920x9c, /* C-M-\ */
1930x9d, //C-M-] 1930x9d, //C-M-]
1940x9e, //C-M-^ 1940x9e, //C-M-^
1950x9f, //C-M-_ 1950x9f, //C-M-_
196' ', //  196' ', // 
197'¡', //¡ 197'¡', //¡
198'¢', //¢ 198'¢', //¢
199'£', //£ 199'£', //£
200'¤', //¤ 200'¤', //¤
@@ -314,17 +314,17 @@ QString buildSortKey( const QString & s )
314 314
315QString buildSortKey( const QString & s1, const QString & s2 ) 315QString buildSortKey( const QString & s1, const QString & s2 )
316{ 316{
317 QString res = s1 + QChar( '\0' ) + s2; 317 QString res = s1 + QChar( '\0' ) + s2;
318 hackString( res ); 318 hackString( res );
319 return res; 319 return res;
320} 320}
321 321
322QString buildSortKey( const QString & s1, const QString & s2, 322QString buildSortKey( const QString & s1, const QString & s2,
323 const QString & s3 ) 323 const QString & s3 )
324{ 324{
325 QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3; 325 QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3;
326 hackString( res ); 326 hackString( res );
327 return res; 327 return res;
328} 328}
329 329
330static inline QChar coll( QChar u ) 330static inline QChar coll( QChar u )
@@ -332,17 +332,17 @@ static inline QChar coll( QChar u )
332 return u.row() ? u : QChar(collationHack[ u.cell() ]); 332 return u.row() ? u : QChar(collationHack[ u.cell() ]);
333} 333}
334 334
335 335
336int compare( const QString & s1, const QString & s2 ) 336int compare( const QString & s1, const QString & s2 )
337{ 337{
338 const QChar* u1 = s1.unicode(); 338 const QChar* u1 = s1.unicode();
339 const QChar* u2 = s2.unicode(); 339 const QChar* u2 = s2.unicode();
340 340
341 if ( u1 == u2 ) 341 if ( u1 == u2 )
342 return 0; 342 return 0;
343 if ( u1 == 0 ) 343 if ( u1 == 0 )
344 return 1; 344 return 1;
345 if ( u2 == 0 ) 345 if ( u2 == 0 )
346 return -1; 346 return -1;
347 int l=QMIN(s1.length(),s2.length()); 347 int l=QMIN(s1.length(),s2.length());
348 while ( l-- && coll(*u1) == coll(*u2) ) 348 while ( l-- && coll(*u1) == coll(*u2) )