Ignore:
Timestamp:
02/13/13 11:43:04 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fix a test when the WidgetsToolBox widget outlives the model's actions.

Also added a warning to setModel's docstring about the life time of the
model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/tests/test_canvastooldock.py

    r11120 r11309  
    1919    def test_dock(self): 
    2020        reg = global_registry() 
    21         reg = QtWidgetRegistry(reg) 
     21        reg = QtWidgetRegistry(reg, parent=self.app) 
    2222 
    2323        toolbox = WidgetToolBox() 
    2424        toolbox.setObjectName("widgets-toolbox") 
    2525        toolbox.setModel(reg.model()) 
     26 
    2627        text = QTextEdit() 
    2728        splitter = QSplitter() 
     
    4647    def test_canvas_tool_dock(self): 
    4748        reg = global_registry() 
    48         reg = QtWidgetRegistry(reg) 
     49        reg = QtWidgetRegistry(reg, parent=self.app) 
    4950 
    5051        dock = CanvasToolDock() 
     
    7576    def test_category_toolbar(self): 
    7677        reg = global_registry() 
    77         reg = QtWidgetRegistry(reg) 
     78        reg = QtWidgetRegistry(reg, parent=self.app) 
    7879 
    7980        w = QuickCategoryToolbar() 
     
    8182        w.show() 
    8283 
    83         def p(action): 
    84             print action.text() 
    85  
    8684        self.app.exec_() 
Note: See TracChangeset for help on using the changeset viewer.