qtmobility/plugins/contacts/symbian/src/filtering/cntsymbiansorterdbms.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/plugins/contacts/symbian/src/filtering/cntsymbiansorterdbms.cpp	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/plugins/contacts/symbian/src/filtering/cntsymbiansorterdbms.cpp	Mon May 03 13:18:40 2010 +0300
@@ -74,7 +74,7 @@
 
 QList<QContactLocalId> CntSymbianSorterDbms::contacts(
             const QList<QContactSortOrder>& sortOrders,
-            QContactManager::Error& error)
+            QContactManager::Error* error)
 {
     // Create an empty list
     // See QT_TRYCATCH_LEAVING note at the begginning of this file
@@ -92,7 +92,7 @@
 QList<QContactLocalId> CntSymbianSorterDbms::sort(
             QList<QContactLocalId> contactIds,
             const QList<QContactSortOrder>& sortOrders,
-            QContactManager::Error& error)
+            QContactManager::Error* error)
 {
     // Create an empty list
     // See QT_TRYCATCH_LEAVING note at the begginning of this file
@@ -109,7 +109,7 @@
 
 bool CntSymbianSorterDbms::sortOrderSupported(const QList<QContactSortOrder>& sortOrders)
 {
-    foreach( QContactSortOrder s, sortOrders ) {
+    foreach(const QContactSortOrder& s, sortOrders ) {
         // Find uids for sortings
         QList<TUid> fieldTypeUids = m_transformContact.supportedSortingFieldTypes(s.detailDefinitionName(), s.detailFieldName());
         if( fieldTypeUids.count() == 0 )
@@ -145,7 +145,7 @@
     // Remove templates from the list
     CContactIdArray *templateIds = m_contactDatabase.GetCardTemplateIdListL();
     CleanupStack::PushL(templateIds);
-    for(TInt i(0); i < templateIds->Count(); i++) {
+    for(TInt i(0); i < templateIds->Count(); ++i) {
         TContactItemId id = (*templateIds)[i];
         TInt index = ids->Find(id);
         if(index > KErrNotFound)
@@ -161,7 +161,7 @@
 
     // Add the contact ids to the returned QList
     QList<QContactLocalId> qIds;
-    for (TInt i(0); i < ids->Count(); i++) {
+    for (TInt i(0); i < ids->Count(); ++i) {
         qIds.append((*ids)[i]);
     }
 
@@ -195,12 +195,12 @@
     CleanupStack::PushL(sort);
 
     // Convert sort orders to TSortPref array
-    foreach (QContactSortOrder s, sortOrders)
+    foreach (const QContactSortOrder& s, sortOrders)
     {
         QList<TUid> fieldTypes = m_transformContact.supportedSortingFieldTypes(s.detailDefinitionName(), s.detailFieldName());
         if (fieldTypes.count())
         {
-            foreach(TUid fieldType, fieldTypes) {
+            foreach(const TUid& fieldType, fieldTypes) {
                 CContactDatabase::TSortPref pref;
                 // NOTE: TSortPref sets order to ascending by default
                 if( s.direction() == Qt::DescendingOrder )