OSDN Git Service

Designer: Fix a crash when open() fails.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Wed, 30 Mar 2011 09:52:15 +0000 (11:52 +0200)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>
Wed, 30 Mar 2011 09:52:15 +0000 (11:52 +0200)
commit776c599384a2a528aab2b84935dfc0020e0ff728
tree1b501afdd8903df69607d195b747404ffd0a68c2
parentb38a256ed679a4b320828afba69255ec86382e85
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
src/plugins/designer/editorwidget.cpp
src/plugins/designer/editorwidget.h
src/plugins/designer/formeditorstack.cpp
src/plugins/designer/formeditorstack.h