forked from qt-creator/qt-creator
Designer: Fix a crash when open() fails.
editorsClosed() is not emitted when open fails and thus the file was not removed from FormEditorStack. Add a connection from destroy to ensure the editor is removed. Happens when loading a session whose files no longer exists. Task-number: QTCREATORBUG-4266 Reviewed-by: dt
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#include "formeditorw.h"
|
||||
#include "formeditorstack.h"
|
||||
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QtGui/QVBoxLayout>
|
||||
@@ -109,9 +111,9 @@ void EditorWidget::add(const EditorData &d)
|
||||
m_stack->add(d);
|
||||
}
|
||||
|
||||
bool EditorWidget::removeFormWindowEditor(Core::IEditor *xmlEditor)
|
||||
void EditorWidget::removeFormWindowEditor(Core::IEditor *xmlEditor)
|
||||
{
|
||||
return m_stack->removeFormWindowEditor(xmlEditor);
|
||||
m_stack->removeFormWindowEditor(xmlEditor);
|
||||
}
|
||||
|
||||
bool EditorWidget::setVisibleEditor(Core::IEditor *xmlEditor)
|
||||
|
||||
Reference in New Issue
Block a user