summaryrefslogtreecommitdiff
path: root/src/plugins/designer/formeditorstack.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-03-30 11:52:15 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-03-30 11:52:15 +0200
commit776c599384a2a528aab2b84935dfc0020e0ff728 (patch)
tree1b501afdd8903df69607d195b747404ffd0a68c2 /src/plugins/designer/formeditorstack.h
parentb38a256ed679a4b320828afba69255ec86382e85 (diff)
downloadqt-creator-776c599384a2a528aab2b84935dfc0020e0ff728.tar.gz
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
Diffstat (limited to 'src/plugins/designer/formeditorstack.h')
-rw-r--r--src/plugins/designer/formeditorstack.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/designer/formeditorstack.h b/src/plugins/designer/formeditorstack.h
index 446a046255..3bb35858be 100644
--- a/src/plugins/designer/formeditorstack.h
+++ b/src/plugins/designer/formeditorstack.h
@@ -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;