-rw-r--r-- | kaddressbook/views/contactlistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index ad43970..23b091c 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp @@ -144,97 +144,97 @@ void DynamicTip::maybeTip( const QPoint &pos ) ++i; } } tip( r, s ); } else hide(); ishidden = !ishidden; } /////////////////////////// // ContactListViewItem Methods ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, ContactListView *parent, KABC::AddressBook *doc, const KABC::Field::List &fields ) : KListViewItem(parent), mAddressee(a), mFields( fields ), parentListView( parent ), mDocument(doc) { refresh(); } QString ContactListViewItem::key(int column, bool ascending) const { #ifndef DESKTOP_VERSION int lan = KGlobal::locale()->language(); //qDebug("language %d ", lan); if ( lan == 1 ) { //GERMAN QString ret = QListViewItem::key(column, ascending).lower().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()); + //qDebug("conv string %s ", ret.latin1()); return ret; } else #endif return QListViewItem::key(column, ascending).lower(); } void ContactListViewItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align) { KListViewItem::paintCell(p, cg, column, width, align); if ( !p ) return; if (parentListView->singleLine()) { p->setPen( parentListView->alternateColor() ); p->drawLine( 0, height() - 1, width, height() - 1 ); } } ContactListView *ContactListViewItem::parent() { return parentListView; } void ContactListViewItem::refresh() { // Update our addressee, since it may have changed else were mAddressee = mDocument->findByUid(mAddressee.uid()); if (mAddressee.isEmpty()) return; int i = 0; KABC::Field::List::ConstIterator it; for( it = mFields.begin(); it != mFields.end(); ++it ) { setText( i++, (*it)->value( mAddressee ) ); } } /////////////////////////////// |