summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-20 11:04:17 (UTC)
committer zautrix <zautrix>2004-10-20 11:04:17 (UTC)
commitc45d38a1574bcb53e1b0fd0dc4987cb725d430c0 (patch) (side-by-side diff)
tree22f1ee07fc4002c49867d5dd36690e54cfe21276 /kaddressbook
parentf6f5f5cfcaa38f3e2bf36d8466b2b44ba7b3fb28 (diff)
downloadkdepimpi-c45d38a1574bcb53e1b0fd0dc4987cb725d430c0.zip
kdepimpi-c45d38a1574bcb53e1b0fd0dc4987cb725d430c0.tar.gz
kdepimpi-c45d38a1574bcb53e1b0fd0dc4987cb725d430c0.tar.bz2
fixed umlaute sort order
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/contactlistview.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 4cc22ea..c74f8cf 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -165,12 +165,38 @@ ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
{
refresh();
}
QString ContactListViewItem::key(int column, bool ascending) const
{
+ int lan = KGlobal::locale()->language();
+ //qDebug("language %d ", lan);
+ if ( lan == 1 ) { //GERMAN
+ QString ret = QListViewItem::key(column, ascending).utf8();
+ int start = -1;
+ while ( (start = ret.find( 'ä', start+1)) > 0 ) {
+ ret.at(start-1) = 'a';
+ }
+ start = -1;
+ while ( (start = ret.find( 'ö', start+1)) > 0 ) {
+ ret.at(start-1) = 'o';
+ }
+ start = -1;
+ while ( (start = ret.find( 'ü', start+1)) > 0 ) {
+ ret.at(start-1) = 'o';
+ }
+ start = -1;
+ while ( (start = ret.find( 'ß', start+1)) > 0 ) {
+ ret.at(start-1) = 's';
+ }
+ //qDebug("conv string %s ", ret.latin1());
+
+ return ret;
+
+ }
+ else
return QListViewItem::key(column, ascending).lower();
}
void ContactListViewItem::paintCell(QPainter * p,
const QColorGroup & cg,
int column,