Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1497

QML Contacts amd Organizer Plugin 1.1 UnionFilter/IntersectFilter not updating when sub filters changed

    XMLWordPrintable

Details

    • 9e87f1a370583b654ba7a94c034efcbdfca0ca15 dfc91645084f8f8f6f4eeba2b68b1defc3567f41 47a82b23aa6216aca19e7f725c032f1b885d739b 1ad232c81febdab0b579b7504400435aee9bf8b3

    Description

      I have a ContactModel with this UnionFilter as its 'filter' property:

      filter: UnionFilter {
      DetailFilter

      { id: firstNameDetailFilter detail: ContactDetail.Name field: Name.FirstName value: "a" matchFlags: DetailFilter.MatchStartsWith }

      DetailFilter

      { id: lastNameDetailFilter detail: ContactDetail.Name field: Name.LastName value: "b" matchFlags: DetailFilter.MatchStartsWith }

      }

      Instead of returning contacts whose first name starts with an 'a' and last name with a 'b', this returns all the contacts. In fact, when I use a UnionFilter with only one DetailFilter, eg the firstNameDetailFilter, it still returns all the contacts. The only scenario where I'm able to filter contacts is if i set the filter property to a single DetailFilter, as below:

      filter: DetailFilter

      { id: firstNameDetailFilter detail: ContactDetail.Name field: Name.FirstName value: "a" matchFlags: DetailFilter.MatchStartsWith }

      In case you are wondering why I have Id's in there, it's so that I can be able to update the filter with dynamic values, like so:

      /some parent's property/
      property alias firstNameFilter : firstNameDetailFilter.value

      /then as required/
      firstNameFilter = "some search value"

      Also, this only works with a single DetailFilter.

      Attachments

        Activity

          People

            charles Charles Yin (closed Nokia identity) (Inactive)
            joeystunna Joel Muriithi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: