Skip to content

Deprecate TaurusWidgetFactory (Fixes #1067)

Carlos Pascual requested to merge c-p/taurus:remove_widget_factory into develop

Refactor several the following APIs to use "module:class" specifications for a widget class instead of relying on TaurusWidgetFactory:

  • the widget class specification in TaurusLauncherButton
  • the class name in TaurusGraphicsScene.getClass
  • the class ID in TaurusValue.set*WidgetClass() methods
  • the class name in taurusgui's *Description classes
  • the defaultCandidates and extraWidgets values in WidgetPage
  • The widget name in DockWidgetPanel.setWidgetFromClassName()

Also use explicit lists of widgets for the tauruspluginplugin and the taurusdemo submodules, instead of relying on TaurusWidgetFactory for introspection of available widgets.

With these changes, all usages of TaurusWidgetFactory in taurus have been removed (except as delayed fall-backs for backwards-compatibility, in which case, informative deprecation warnings are issued)

Note that this MR also enables passing generic QWidget specifications (i.e. not limited to official taurus widgets) to all the above APIs

Edited by Carlos Pascual

Merge request reports