author | drw <drw> | 2005-03-15 18:20:46 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-15 18:20:46 (UTC) |
commit | e0a3ecfb3981cbc6fa413b08b123685a6c2632d1 (patch) (unidiff) | |
tree | 04e9592ba48c5a25a8ffd474cec923c2bfdfa9bd /libopie2/opiepim | |
parent | 90d940ea8244140b25552bb8a28eacb7d3db01e8 (diff) | |
download | opie-e0a3ecfb3981cbc6fa413b08b123685a6c2632d1.zip opie-e0a3ecfb3981cbc6fa413b08b123685a6c2632d1.tar.gz opie-e0a3ecfb3981cbc6fa413b08b123685a6c2632d1.tar.bz2 |
Fix addressbook sort by implementing sorting by 'File As' name
-rw-r--r-- | libopie2/opiepim/private/opimcontactsortvector.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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, | |||
41 | return 0; | 41 | return 0; |
42 | 42 | ||
43 | bool soTitle, soSummary, soFirstName, soMiddleName, soSuffix, soEmail, | 43 | bool soTitle, soSummary, soFirstName, soMiddleName, soSuffix, soEmail, |
44 | soNick, soAnni, soBirth, soGender; | 44 | soNick, soFileAs, soAnni, soBirth, soGender; |
45 | soTitle = soSummary = soFirstName = soMiddleName = soSuffix = soEmail = | 45 | soTitle = soSummary = soFirstName = soMiddleName = soSuffix = soEmail = |
46 | soNick = soAnni = soBirth = soGender = false; | 46 | soNick = soFileAs = soAnni = soBirth = soGender = false; |
47 | int ret = 0; | 47 | int ret = 0; |
48 | bool asc = sortAscending(); | 48 | bool asc = sortAscending(); |
49 | 49 | ||
@@ -76,6 +76,10 @@ int OPimContactSortVector::compareItems( const OPimContact& left, | |||
76 | ret = testString( left.nickname(), right.nickname() ); | 76 | ret = testString( left.nickname(), right.nickname() ); |
77 | soNick = true; | 77 | soNick = true; |
78 | break; | 78 | break; |
79 | case OPimContactAccess::SortFileAsName: | ||
80 | ret = testString( left.fileAs(), right.fileAs() ); | ||
81 | soFileAs = true; | ||
82 | break; | ||
79 | case OPimContactAccess::SortAnniversary: | 83 | case OPimContactAccess::SortAnniversary: |
80 | ret = testDate( left.anniversary(), right.anniversary() ); | 84 | ret = testDate( left.anniversary(), right.anniversary() ); |
81 | soAnni = true; | 85 | soAnni = true; |