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:
@@ -66,7 +66,6 @@ public:
|
||||
explicit FormEditorStack(QWidget *parent = 0);
|
||||
|
||||
void add(const EditorData &d);
|
||||
bool removeFormWindowEditor(Core::IEditor *xmlEditor);
|
||||
|
||||
bool setVisibleEditor(Core::IEditor *xmlEditor);
|
||||
SharedTools::WidgetHost *formWindowEditorForXmlEditor(const Core::IEditor *xmlEditor) const;
|
||||
@@ -74,14 +73,17 @@ public:
|
||||
|
||||
EditorData activeEditor() const;
|
||||
|
||||
public slots:
|
||||
void removeFormWindowEditor(QObject *);
|
||||
|
||||
private slots:
|
||||
void updateFormWindowSelectionHandles();
|
||||
void modeAboutToChange(Core::IMode *);
|
||||
void formSizeChanged(int w, int h);
|
||||
|
||||
private:
|
||||
inline int indexOf(const QDesignerFormWindowInterface *) const;
|
||||
inline int indexOf(const Core::IEditor *xmlEditor) const;
|
||||
inline int indexOfFormWindow(const QDesignerFormWindowInterface *) const;
|
||||
inline int indexOfFormEditor(const QObject *xmlEditor) const;
|
||||
|
||||
QList<EditorData> m_formEditors;
|
||||
QDesignerFormEditorInterface *m_designerCore;
|
||||
|
||||
Reference in New Issue
Block a user