Page MenuHomePhorge

Extract action groups into separate QML files
Needs ReviewPublic

Authored by nannanko on Sat, Aug 22, 11:02 PM.

Details

Reviewers
tusooa
Group Reviewers
O1: the Kazv Project
Summary

Extract action groups into separate QML files. No behavior changed intended.

Type: skip

Test Plan

Verify unit tests pass.

Diff Detail

Repository
rK kazv
Branch
nannanko/stacked
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 717
Build 1416: Invoke BuildbotBuildbot build #2581
Build 1415: arc lint + arc unit

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Sat, Aug 22, 11:04 PM
Harbormaster failed remote builds in B709: Diff 1095!

Finally, it does not seem to me that the shortcuts directory is suitable for individual actions. I feel it is a directory to provide tools to interact with actions rather than actions themselves.

src/contents/ui/Main.qml
228–242

This looks a little bit messy. We can reduce the duplication by changing ActionCollection's children property's type to list<QtObject> and directly specify

children: [KazvShortcuts.GlobalDrawerActions {}, ...]

It would be also good to put the list of children in its own file, say AllActions.qml:

KazvShortcuts.ActionCollection {
  children: [...]
}

and in Main.qml, define the actionCollection to be

AllActions {
  shortcutsConfig: kazvConfig
}
src/contents/ui/shortcuts/BubbleActions.qml
12

I think it will be more appropriate to use an ActionColection here.

Use ActionCollection instead of QtObject

tusooa requested changes to this revision.Tue, Aug 25, 2:42 PM
tusooa added inline comments.
src/contents/ui/shortcuts/BubbleActions.qml
15–16

we can declare these two properties in ActionCollection (declare property list<QtObject> actions there because the actions do not necessarily have a common class other than QtObject)

This revision now requires changes to proceed.Tue, Aug 25, 2:42 PM
nannanko marked an inline comment as done.

Change the type of ActionCollection.children to list<QtObject>