Improve PageRouter API
ClosedPublic

Authored by cblack on Apr 29 2020, 7:55 PM.

Details

Reviewers
mart
Group Reviewers
Kirigami
Commits
R169:db704d344b2c: Improve PageRouter API
Summary

This patch fixes shortcomings in the PageRouter API regarding ease of use, verbosity, idiomaticness, and signals.

Introduced:

  • pushFromHere() and popFromHere(): pushing and popping operations that operate from the current route
  • watchedRoute and watchedRouteActive: declarative counterpart to routeActive that responds to signals
  • Navigation signals

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cblack created this revision.Apr 29 2020, 7:55 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptApr 29 2020, 7:55 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
cblack updated this revision to Diff 81555.Apr 29 2020, 8:15 PM

Add missing EOF linebreak

cblack requested review of this revision.Apr 29 2020, 8:20 PM
mart added a subscriber: mart.May 7 2020, 1:49 PM
mart added inline comments.
src/pagerouter.h
443 ↗(On Diff #81555)

could this be just a QStringList?

cblack added inline comments.May 7 2020, 1:52 PM
src/pagerouter.h
443 ↗(On Diff #81555)

It could possibly be a list, but not of pure strings. You want to be able to watch a list of routes?

cblack added inline comments.May 7 2020, 2:46 PM
src/pagerouter.h
443 ↗(On Diff #81555)

Watching a list of routes is probably going to result in both clunky code and clunky API design in return for minimal gains.

mart accepted this revision.May 11 2020, 3:41 PM
This revision is now accepted and ready to land.May 11 2020, 3:41 PM
This revision was automatically updated to reflect the committed changes.