Menu

#34 TaurusWidgetFactory returns wrong widget package

unassigned
active
taurus (5)
bug
2015-03-30
2014-01-23
No

TaurusWidgetFactory algorithm is not taking into account the real module where a widget is defined.

Example

# TaurusWidget is defined in: taurus.qt.qtgui.container.tauruswidget
from taurus.qt.qtgui.util.tauruswidgetfactory import TaurusWidgetFactory
factory = TaurusWidgetFactory()
print(factory.getWidgets()['TaurusWidget']

generates:

('taurus.qt.qtgui.panel', <class 'taurus.qt.qtgui.container.tauruswidget.TaurusWidget'>)

it should generate:

('taurus.qt.qtgui.container.tauruswidget', <class 'taurus.qt.qtgui.container.tauruswidget.TaurusWidget'>)

as a reference, a better algorithm to handle class/package can be found in Sardana MacroServer:

https://sourceforge.net/p/sardana/sardana.git/ci/master/tree/src/sardana/macroserver/msmacromanager.py

Discussion

  • Zbigniew Reszela

    • status: open --> active
     
  • Carlos Pascual

    Carlos Pascual - 2014-07-08
    • Milestone: Jul14 --> Jan15
     
  • Carlos Pascual

    Carlos Pascual - 2015-02-03
    • Milestone: Jan15 --> unassigned
     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/71/

    Can't be converted:

    • _category: taurus-qt