fix: panel/window bugs surfaced by new gtest coverage
- MainWindowLayoutInfo: toXml() iterated open_sequences_ for the <viewers> section and fromXml() never parsed it, so open footage viewers were lost on layout save/load - PanelWidget never set QObject::objectName, so PanelManager::GetPanelWithName() always returned nullptr and every caller (layout restore, NodeView param panel lookup) was dead code - PanelManager::DestroyInstance() left instance_ dangling (UAF on any later RegisterPanel), unlike the other singletons
This commit is contained in:
@@ -42,6 +42,11 @@ PanelWidget::PanelWidget(const QString &object_name)
|
||||
, border_visible_(false)
|
||||
, signal_instead_of_close_(false)
|
||||
{
|
||||
// KDDockWidgets stores object_name as its uniqueName but does not set it
|
||||
// as the QObject::objectName; PanelManager::GetPanelWithName() (and layout
|
||||
// restore in MainWindow) look panels up by objectName, so mirror it here
|
||||
setObjectName(object_name);
|
||||
|
||||
View<QWidget>::setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
connect(this, &PanelWidget::shown, this,
|
||||
|
||||
Reference in New Issue
Block a user