summaryrefslogtreecommitdiff
path: root/libopie
authoreilers <eilers>2002-11-13 15:02:46 (UTC)
committer eilers <eilers>2002-11-13 15:02:46 (UTC)
commit2bc05c54b2ff1a9b2af7d6bd4d55428cfe0d8db3 (patch) (side-by-side diff)
tree8fdc9e49e0a85927fee9497b9d8c5e34e96b049e /libopie
parent2255284b2e80bdc2881ab9106e9afa614a08c140 (diff)
downloadopie-2bc05c54b2ff1a9b2af7d6bd4d55428cfe0d8db3.zip
opie-2bc05c54b2ff1a9b2af7d6bd4d55428cfe0d8db3.tar.gz
opie-2bc05c54b2ff1a9b2af7d6bd4d55428cfe0d8db3.tar.bz2
Small Bug in sorted fixed
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_xml.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie/pim/ocontactaccessbackend_xml.h b/libopie/pim/ocontactaccessbackend_xml.h
index 8b95102..adc8dc3 100644
--- a/libopie/pim/ocontactaccessbackend_xml.h
+++ b/libopie/pim/ocontactaccessbackend_xml.h
@@ -12,16 +12,19 @@
* ToDo: XML-Backend: Automatic reload if something was changed...
*
*
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.7 2002/11/13 15:02:46 eilers
+ * Small Bug in sorted fixed
+ *
* Revision 1.6 2002/11/13 14:14:51 eilers
* Added sorted for Contacts..
*
* Revision 1.5 2002/11/01 15:10:42 eilers
* Added regExp-search in database for all fields in a contact.
*
* Revision 1.4 2002/10/16 10:52:40 eilers
* Added some docu to the interface and now using the cache infrastucture by zecke.. :)
@@ -307,22 +310,22 @@ class OContactAccessBackend_XML : public OContactAccessBackend {
// Currently only asc implemented..
QArray<int> sorted( bool asc, int , int , int )
{
QMap<QString, int> nameToUid;
QStringList names;
QArray<int> m_currentQuery( m_contactList.count() );
- // First fill map and StringList with all Names ( better LastNames ? )
+ // First fill map and StringList with all Names
// Afterwards sort namelist and use map to fill array to return..
QValueListConstIterator<OContact> it;
for( it = m_contactList.begin(); it != m_contactList.end(); ++it ){
- names.append( (*it).lastName() );
- nameToUid.insert( (*it).lastName(), (*it).uid() );
+ names.append( (*it).fileAs() );
+ nameToUid.insert( (*it).fileAs(), (*it).uid() );
}
names.sort();
int i = 0;
if ( asc ){
for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
m_currentQuery[i++] = nameToUid[ (*it) ];
}else{