ApplicationWindow isn't cleaning up StatusBarManager
- Dominant language
- Python
- Stars
- 115
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Qt `ApplicationWindow` tests are leaking `QStatusBar`:
ApplicationWindow tests output
```
QObjects at start of test run: {'QApplication': 2}.
[Wed Jun 10 22:41:07 2020] ( 1/16) test_activate (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:07 2020] ( 2/16) test_close (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:08 2020] ( 3/16) test_icon (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:08 2020] ( 4/16) test_menubar (pyface.tests.test_application_window.TestApplicationWindow) ... ok
test_menubar (pyface.tests.test_application_window.TestApplicationWindow) changed QObject counts. added: {'QAction': 5}.
[Wed Jun 10 22:41:08 2020] ( 5/16) test_open_close (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:08 2020] ( 6/16) test_position (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:09 2020] ( 7/16) test_reposition (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:09 2020] ( 8/16) test_resize (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:09 2020] ( 9/16) test_retitle (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:09 2020] (10/16) test_show (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:09 2020] (11/16) test_size (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:10 2020] (12/16) test_statusbar (pyface.tests.test_application_window.TestApplicationWindow) ... ok
test_statusbar (pyface.tests.test_application_window.TestApplicationWindow) changed QObject counts. added: {'QStatusBar': 1}.
[Wed Jun 10 22:41:10 2020] (13/16) test_statusbar_changed (pyface.tests.test_application_window.TestApplicationWindow) ... ok
test_statusbar_changed (pyface.tests.test_application_window.TestApplicationWindow) changed QObject counts. added: {'QStatusBar': 1}.
[Wed Jun 10 22:41:10 2020] (14/16) test_title (pyface.tests.test_application_window.TestApplicationWindow) ... ok
[Wed Jun 10 22:41:10 2020] (15/16) test_toolbar (pyface.tests.test_application_window.TestApplicationWindow) ... ok
test_toolbar (pyface.tests.test_application_window.TestApplicationWindow) changed QObject counts. added: {'QAction': 5, '_ToolBar': 1}.
[Wed Jun 10 22:41:10 2020] (16/16) test_toolbar_changed (pyface.tests.test_application_window.TestApplicationWindow) ... ok
test_toolbar_changed (pyface.tests.test_application_window.TestApplicationWindow) changed QObject counts. added: {'QAction': 5, '_ToolBar': 1}.
QObjects at end of test run: {'QApplication': 2, 'QAction': 15, 'QStatusBar': 2, '_ToolBar': 2}.
```
In `MApplicationWindow`, `MenuBarManager` and `ToolBarManager` are destroyed but not `StatusBarManager`. This can be done via `destroy_status_bar` (qt) or `remove_status_bar` (wx).
The first step would probably be bringing qt and wx interfaces together and then simply adding a couple lines of code to `MApplicationWindow`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.