Code review comment for lp:~canonical-dx-team/unity/unity.qlmenuitems

Revision history for this message
Mirco Müller (macslow) wrote :

> - In + else
> 64 + {
> 65 + QuicklistMenuItemLabel* item = new QuicklistMenuItemLabel
> (newitem, NUX_TRACKER_LOCATION);
> 66 + quicklist->AddMenuItem (item);
> 67 + }
>
> I think you should explicitly check for label item, and in the "else" you
> should warn that we don't support item of type $type

From what I've seen and tried with DBusMenu one can explicitly test for a "plain label"-item. Only can one distinguish between a separator, a checkmark-item and a radiobutton-item. Only when tests against these three fail one can implicitly assume one is dealing with a "plain label" item. I've looked at the DBusMenu-API in devhelp and also at the old unit-test test-dbusmenu-quicklist.vala. Nothing hints that there is a possibility for an explicit test. Only this exclusion-approach can be used.

« Back to merge proposal