From e0a3ecfb3981cbc6fa413b08b123685a6c2632d1 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 15 Mar 2005 18:20:46 +0000 Subject: Fix addressbook sort by implementing sorting by 'File As' name --- (limited to 'libopie2/opiepim') diff --git a/libopie2/opiepim/private/opimcontactsortvector.cpp b/libopie2/opiepim/private/opimcontactsortvector.cpp index 9e186fe..8c7d5ca 100644 --- a/libopie2/opiepim/private/opimcontactsortvector.cpp +++ b/libopie2/opiepim/private/opimcontactsortvector.cpp @@ -41,9 +41,9 @@ int OPimContactSortVector::compareItems( const OPimContact& left, return 0; bool soTitle, soSummary, soFirstName, soMiddleName, soSuffix, soEmail, - soNick, soAnni, soBirth, soGender; + soNick, soFileAs, soAnni, soBirth, soGender; soTitle = soSummary = soFirstName = soMiddleName = soSuffix = soEmail = - soNick = soAnni = soBirth = soGender = false; + soNick = soFileAs = soAnni = soBirth = soGender = false; int ret = 0; bool asc = sortAscending(); @@ -76,6 +76,10 @@ int OPimContactSortVector::compareItems( const OPimContact& left, ret = testString( left.nickname(), right.nickname() ); soNick = true; break; + case OPimContactAccess::SortFileAsName: + ret = testString( left.fileAs(), right.fileAs() ); + soFileAs = true; + break; case OPimContactAccess::SortAnniversary: ret = testDate( left.anniversary(), right.anniversary() ); soAnni = true; -- cgit v0.9.0.2