summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/contactlistview.cpp
Unidiff
Diffstat (limited to 'kaddressbook/views/contactlistview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/views/contactlistview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index c74f8cf..5fb4163 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -159,24 +159,25 @@ void DynamicTip::maybeTip( const QPoint &pos )
159ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, 159ContactListViewItem::ContactListViewItem(const KABC::Addressee &a,
160 ContactListView *parent, 160 ContactListView *parent,
161 KABC::AddressBook *doc, 161 KABC::AddressBook *doc,
162 const KABC::Field::List &fields ) 162 const KABC::Field::List &fields )
163 : KListViewItem(parent), mAddressee(a), mFields( fields ), 163 : KListViewItem(parent), mAddressee(a), mFields( fields ),
164 parentListView( parent ), mDocument(doc) 164 parentListView( parent ), mDocument(doc)
165{ 165{
166 refresh(); 166 refresh();
167} 167}
168 168
169QString ContactListViewItem::key(int column, bool ascending) const 169QString ContactListViewItem::key(int column, bool ascending) const
170{ 170{
171#ifndef DESKTOP_VERSION
171 int lan = KGlobal::locale()->language(); 172 int lan = KGlobal::locale()->language();
172 //qDebug("language %d ", lan); 173 //qDebug("language %d ", lan);
173 if ( lan == 1 ) { //GERMAN 174 if ( lan == 1 ) { //GERMAN
174 QString ret = QListViewItem::key(column, ascending).utf8(); 175 QString ret = QListViewItem::key(column, ascending).utf8();
175 int start = -1; 176 int start = -1;
176 while ( (start = ret.find( 'ä', start+1)) > 0 ) { 177 while ( (start = ret.find( 'ä', start+1)) > 0 ) {
177 ret.at(start-1) = 'a'; 178 ret.at(start-1) = 'a';
178 } 179 }
179 start = -1; 180 start = -1;
180 while ( (start = ret.find( 'ö', start+1)) > 0 ) { 181 while ( (start = ret.find( 'ö', start+1)) > 0 ) {
181 ret.at(start-1) = 'o'; 182 ret.at(start-1) = 'o';
182 } 183 }
@@ -185,24 +186,25 @@ QString ContactListViewItem::key(int column, bool ascending) const
185 ret.at(start-1) = 'o'; 186 ret.at(start-1) = 'o';
186 } 187 }
187 start = -1; 188 start = -1;
188 while ( (start = ret.find( 'ß', start+1)) > 0 ) { 189 while ( (start = ret.find( 'ß', start+1)) > 0 ) {
189 ret.at(start-1) = 's'; 190 ret.at(start-1) = 's';
190 } 191 }
191 //qDebug("conv string %s ", ret.latin1()); 192 //qDebug("conv string %s ", ret.latin1());
192 193
193 return ret; 194 return ret;
194 195
195 } 196 }
196 else 197 else
198#endif
197 return QListViewItem::key(column, ascending).lower(); 199 return QListViewItem::key(column, ascending).lower();
198} 200}
199 201
200void ContactListViewItem::paintCell(QPainter * p, 202void ContactListViewItem::paintCell(QPainter * p,
201 const QColorGroup & cg, 203 const QColorGroup & cg,
202 int column, 204 int column,
203 int width, 205 int width,
204 int align) 206 int align)
205{ 207{
206 KListViewItem::paintCell(p, cg, column, width, align); 208 KListViewItem::paintCell(p, cg, column, width, align);
207 209
208 if ( !p ) 210 if ( !p )