Use SortFilterModel for custom models

Bug #1480947 reported by Olivier Tilloy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Medium
Bill Filler
webbrowser-app (Ubuntu)
Fix Released
Medium
Olivier Tilloy

Bug Description

While browsing the UITK documentation, I stumbled upon https://developer.ubuntu.com/api/apps/qml/sdk-15.04/Ubuntu.Components.SortFilterModel/, which is essentially QSortFilterProxyModel exposed to QML.

webbrowser-app has a number of custom models written in C++ that inherit QSortFilterProxyModel. Some of them could most likely be replaced by a pure QML component with this model from the UITK.

From a very quick glance, the following models are candidates:
 - HistoryDomainModel
 - BookmarksFolderModel
 - HistoryDomainListChronologicalModel

This would have the advantage of removing a significant amount of custom C++ code, speeding up build time and unit tests run time.

Tags: refactoring

Related branches

Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: refactoring
Revision history for this message
Olivier Tilloy (osomon) wrote :

Blocked on bug #1485674.

Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
status: Triaged → In Progress
Revision history for this message
Olivier Tilloy (osomon) wrote :

The substitution of HistoryLastVisitDateModel with a SortFilterModel is blocked by bug #1495641.

Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → Medium
milestone: none → ww02-2016
status: New → In Progress
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.23+16.04.20151204-0ubuntu1

---------------
webbrowser-app (0.23+16.04.20151204-0ubuntu1) xenial; urgency=medium

  [ CI Train Bot ]
  * New rebuild forced.
  * Resync trunk.

  [ Olivier Tilloy ]
  * Fix 3 autopilot test failures on desktop in narrow mode. (LP:
    #1522344)
  * Fix multiple keyboard focus/shortcut issues. (LP: #1522776,
    #1522783, #1522757, #1522767)
  * Replace custom models (HistoryDomainListChronologicalModel,
    HistoryLastVisitDateModel and TopSitesModel) with simple, pure QML
    SortFilterModel instances. Remove entirely HistoryTimeframeModel
    which was not needed any longer. (LP: #1480947)
  * Skip a test that requires HTTPS support in the test suite, which is
    lacking for now.
  * Update translation template.

 -- Olivier Tilloy <email address hidden> Fri, 04 Dec 2015 11:06:50 +0000

Changed in webbrowser-app (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.