diff options
author | Vincent Reher <[email protected]> | 2022-03-05 15:14:32 -0800 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2022-07-02 16:02:09 +0900 |
commit | d4e06b76962198eb64e6c2826d4695248102037c (patch) | |
tree | 2ab32e02df377eb96cc5ba0dc04729ae61c047e9 /konqueror/listview/konq_listviewitems.cpp | |
parent | d59c8ee79f91d41d0979bd09c5e50cc43916330c (diff) | |
download | tdebase-d4e06b76962198eb64e6c2826d4695248102037c.tar.gz tdebase-d4e06b76962198eb64e6c2826d4695248102037c.zip |
Replace listview's binary "Case Insensitive Sort" option with 3 mutually exclusive options:
1. Unicode based (AB...ab)
2. Unicode based, case insensitive (aAbB)
2. Locale based
This resolves issue #252.
Signed-off-by: Vincent Reher <[email protected]>
Diffstat (limited to 'konqueror/listview/konq_listviewitems.cpp')
-rw-r--r-- | konqueror/listview/konq_listviewitems.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/konqueror/listview/konq_listviewitems.cpp b/konqueror/listview/konq_listviewitems.cpp index cf4322ef0..1766a0b0b 100644 --- a/konqueror/listview/konq_listviewitems.cpp +++ b/konqueror/listview/konq_listviewitems.cpp @@ -19,6 +19,7 @@ #include "konq_listview.h" #include <konq_settings.h> +#include "konq_string_compare.h" #include <kdebug.h> #include <tdelocale.h> #include <assert.h> @@ -303,11 +304,10 @@ int KonqBaseListViewItem::compare( TQListViewItem* item, int col, bool ascending break; } } - if ( m_pListViewWidget->caseInsensitiveSort() ) - return text( col ).lower().localeAwareCompare( k->text( col ).lower() ); - else { - return m_pListViewWidget->m_pSettings->caseSensitiveCompare( text( col ), k->text( col ) ); - } + + /* If we reach here, we are comparing text columns (e.g file name). */ + + return stringCompare( m_pListViewWidget->m_sortOrder, text( col ), k->text( col ) ); } void KonqListViewItem::paintCell( TQPainter *_painter, const TQColorGroup & _cg, int _column, int _width, int _alignment ) |