Mentions légales du service

Skip to content

Fix parameter/parameterWidget accessors for dtkWidgetsMenuBar

VESIN Marc requested to merge feature/fix-menubar-accessor into develop

parameter/parameterWidget accessors for dtkWidgetsMenuBar do not function as expected in #13 (closed)

dtkWidgetsParameter *dtkWidgetsMenuBar::widget(const QString& id)
dtkCoreParameter *dtkWidgetsMenuBar::parameter(const QString& id)

Currently needs to be called with id = "uid_group1:uid_group2:label_parameter" when it is supposed to be called with id = "uid_group1:uid_group2:uid_parameter". Using label_parameter instead of uid_parameter has several problems :

  • does not match expected behaviour
  • heterogeneous string (mix of label and uid) makes it complicated for the developper
  • (arguably) label will be more often modified dynamically by the application than uid which makes it less desirable as accessor parameter

Fix includes:

  • fix param/widget accessors for dtkWidgetsMenuBar
  • implies adding accessor objectFromUid to menu widget
  • example using it to easily set RO/RW a widget in a menu
Edited by VESIN Marc

Merge request reports