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

Gallery QML DocumentGalleryModel sort order not supported

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • 1.1.x
    • Document Gallery
    • fecbb8e6644f1d956e8e7426a4262fb2614f68bb

      DocumentGalleryModel does not have any support for sort order (ASC/DESC). Now it seems to be always ASC.

      There should be possibility to set sort order by sortProperty as it is quite common case that pictures are primary sorted by DESC dateTaken/lastModified and secondary sorted by fileName/title.

      One possible way to add sort order support for DocumentGalleryModel:

      DocumentGalleryModel {
                  id:photoModel
                  rootType: DocumentGallery.Image
                  properties: [ "url",
                      "title",
                      "lastModified",
                      "dateTaken"]
                  sortProperties: ["dateTaken", "lastModified", "title"]
                  sortPropertiesOrders: ["DESC", "DESC", "ASC"]
              }    
      

      Another possible way to add sort order support for DocumentGalleryModel:

      DocumentGalleryModel {
                  id:photoModel
                  rootType: DocumentGallery.Image
                  properties: [ "url",
                      "title",
                      "lastModified",
                      "dateTaken"]
                  sortProperties: ["dateTaken (DESC)", "lastModified (DESC)", "title (ASC)"]
              }   
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            xizzhu Xizhi Zhu (Steven)
            tliljend Teemu Liljendahl
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes