qtmobility/plugins/contacts/symbian/src/filtering/cntsymbianfilterdbms.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
   146             detailFilter.setValue(value);
   146             detailFilter.setValue(value);
   147             intersectionFilter.append(detailFilter);
   147             intersectionFilter.append(detailFilter);
   148         }
   148         }
   149         // The resulting filter is handled with a recursive function call
   149         // The resulting filter is handled with a recursive function call
   150         result = contacts(intersectionFilter, sortOrders, filterSupportedFlag, error);
   150         result = contacts(intersectionFilter, sortOrders, filterSupportedFlag, error);
       
   151     } else if (filter == QContactFilter()) {
       
   152         // Empty filter -> don't do any filtering and tell the caller to not
       
   153         // to do any filtering either
       
   154         filterSupportedFlag = true;
       
   155         result = filterContacts(QContactInvalidFilter(), error);
   151     } else {
   156     } else {
   152         FilterSupport filterSupport = filterSupportLevel(filter);
   157         FilterSupport filterSupport = filterSupportLevel(filter);
   153         if (filterSupport == Supported) {
   158         if (filterSupport == Supported) {
   154             filterSupportedFlag = true;
   159             filterSupportedFlag = true;
   155             // Filter supported, use as the result directly
   160             // Filter supported, use as the result directly
   281                 matchFlags == QContactFilter::MatchFixedString) {
   286                 matchFlags == QContactFilter::MatchFixedString) {
   282                 return SupportedPreFilterOnly;
   287                 return SupportedPreFilterOnly;
   283             }            
   288             }            
   284         // display label, this is a special case that contains several name
   289         // display label, this is a special case that contains several name
   285         // fields and company name
   290         // fields and company name
   286         //TODO: "unnamed" display label is not supported currently
       
   287         } else if (defName == QContactDisplayLabel::DefinitionName) {
   291         } else if (defName == QContactDisplayLabel::DefinitionName) {
   288             
   292             
   289             if (matchFlags == QContactFilter::MatchStartsWith) {
   293             if (matchFlags == QContactFilter::MatchStartsWith) {
   290                 return Supported;
   294                 return Supported;
   291             }
   295             }