-rw-r--r-- | library/backend/stringutil.cpp | 12 |
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 @@ -48,37 +48,37 @@ static const char collationHack[] = { 0x0c, //C-L 0x0d, //C-M 0x0e, //C-N 0x0f, //C-O 0x10, //C-P 0x11, //C-Q 0x12, //C-R 0x13, //C-S 0x14, //C-T 0x15, //C-U 0x16, //C-V 0x17, //C-W 0x18, //C-X 0x19, //C-Y 0x1a, //C-Z 0x1b, //C-[ -0x1c, //C-\ +0x1c, /* C-\ */ 0x1d, //C-] 0x1e, //C-^ 0x1f, //C-_ -' ', // +' ', // '!', //! '"', //" '#', //# '$', //$ '%', //% '&', //& '\'', //' '(', //( ')', //) '*', //* '+', //+ ',', //, '-', //- '.', //. '/', /// 0x80, //0 @@ -112,33 +112,33 @@ static const char collationHack[] = { 'L', //L 'M', //M 'N', //N 'O', //O 'P', //P 'Q', //Q 'R', //R 'S', //S 'T', //T 'U', //U 'V', //V 'W', //W 'X', //X 'Y', //Y 'Z', //Z '[', //[ -'\\', //\ +'\\', /* \ */ ']', //] '^', //^ '_', //_ '`', //` 'A', //a 'B', //b 'C', //c 'D', //d 'E', //e 'F', //f 'G', //g 'H', //h 'I', //i 'J', //j 'K', //k 'L', //l @@ -176,33 +176,33 @@ static const char collationHack[] = { 0x8c, //C-M-L 0x8d, //C-M-M 0x8e, //C-M-N 0x8f, //C-M-O 0x90, //C-M-P 0x91, //C-M-Q 0x92, //C-M-R 0x93, //C-M-S 0x94, //C-M-T 0x95, //C-M-U 0x96, //C-M-V 0x97, //C-M-W 0x98, //C-M-X 0x99, //C-M-Y 0x9a, //C-M-Z 0x9b, //C-M-[ -0x9c, //C-M-\ +0x9c, /* C-M-\ */ 0x9d, //C-M-] 0x9e, //C-M-^ 0x9f, //C-M-_ ' ', // '¡', //¡ '¢', //¢ '£', //£ '¤', //¤ '¥', //¥ '¦', //¦ '§', //§ '¨', //¨ '©', //© 'A', //ª '«', //« '¬', //¬ @@ -306,51 +306,51 @@ static void hackString ( QString &s ) } QString buildSortKey( const QString & s ) { QString res = s; hackString( res ); return res; } QString buildSortKey( const QString & s1, const QString & s2 ) { QString res = s1 + QChar( '\0' ) + s2; hackString( res ); return res; } -QString buildSortKey( const QString & s1, const QString & s2, +QString buildSortKey( const QString & s1, const QString & s2, const QString & s3 ) { QString res = s1 + QChar( '\0' ) + s2 + QChar( '\0' ) + s3; hackString( res ); return res; } static inline QChar coll( QChar u ) { return u.row() ? u : QChar(collationHack[ u.cell() ]); } int compare( const QString & s1, const QString & s2 ) { const QChar* u1 = s1.unicode(); const QChar* u2 = s2.unicode(); - + if ( u1 == u2 ) return 0; if ( u1 == 0 ) return 1; if ( u2 == 0 ) return -1; int l=QMIN(s1.length(),s2.length()); while ( l-- && coll(*u1) == coll(*u2) ) u1++,u2++; if ( l==-1 ) return ( s1.length()-s2.length() ); return u1->unicode() - u2->unicode(); } QString simplifyMultiLineSpace( const QString &multiLine ) { |