[QML] The AccountModel API should tell whether the model is ready
Bug #1513075 reported by
Alberto Mardegan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Online Accounts API |
Fix Released
|
High
|
Alberto Mardegan | ||
webapps-sprint |
Fix Released
|
High
|
Alberto Mardegan |
Bug Description
Since getting the list of accounts involves making a D-Bus call, which is currently asynchronous. While this call is executed, the "count" property is 0. In other words, it's impossible for the client to tell whether the model is empty because it's not yet ready or because there isn't actually any account available.
Possible solutions:
- add a signal to tell whether the model is ready
- set the count to -1 until the model is not ready
- make the D-Bus call synchronous (probably the worst option!)
Related branches
lp:~mardy/online-accounts-api/ready-1513075
- Online Accounts: Pending requested
-
Diff: 126 lines (+40/-1)3 files modifiedsrc/lib/Ubuntu/OnlineAccounts.2/account_model.cpp (+27/-0)
src/lib/Ubuntu/OnlineAccounts.2/account_model.h (+4/-0)
tests/lib/qml_module/tst_qml_module.cpp (+9/-1)
Changed in online-accounts-api: | |
status: | New → In Progress |
assignee: | nobody → Alberto Mardegan (mardy) |
importance: | Undecided → High |
Changed in webapps-sprint: | |
status: | New → In Progress |
assignee: | nobody → Alberto Mardegan (mardy) |
importance: | Undecided → High |
milestone: | none → sprint-18 |
Changed in webapps-sprint: | |
status: | In Progress → Fix Committed |
Changed in online-accounts-api: | |
status: | In Progress → Fix Committed |
Changed in webapps-sprint: | |
status: | Fix Committed → Fix Released |
Changed in online-accounts-api: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.