Page MenuHomePhabricator

elementary: enforce container type check for efl_ui_item_index_get and improve documentation.
ClosedPublic

Authored by cedric on Dec 20 2019, 11:03 AM.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cedric created this revision.Dec 20 2019, 11:03 AM
cedric requested review of this revision.Dec 20 2019, 11:03 AM

I approve these docs.

SanghyeonLee added inline comments.Dec 23 2019, 3:09 AM
src/lib/elementary/efl_ui_item.c
151

hmm so you want index get failed in view cases even though user might able to get the item reference?

zmike added a subscriber: zmike.Dec 23 2019, 7:31 AM

This seems good.

src/lib/elementary/efl_ui_item.c
151

It would fail anyway if this check fails, no?

SanghyeonLee accepted this revision.Dec 24 2019, 3:01 AM
SanghyeonLee added inline comments.
src/lib/elementary/efl_ui_item.c
151

that's true unless item know the model and get index from it in view container cases.

This revision is now accepted and ready to land.Dec 24 2019, 3:01 AM
zmike added inline comments.Dec 24 2019, 6:19 AM
src/lib/elementary/efl_ui_item.c
151

Okay, but in the mvvm case if you have an item object which doesn't have a valid container then most likely it's just a cached item object which isn't in use, right?

This revision was automatically updated to reflect the committed changes.