Commit 61f7965b authored by con's avatar con
Browse files

Merge remote branch 'origin/2.1'

Conflicts:
	README
	doc/qt-html-templates.qdocconf
	doc/qtcreator.qdoc
	doc/qtcreator.qdocconf
	share/qtcreator/templates/wizards/qtcreatorplugin/MyPlugin.pluginspec
	src/app/Info.plist
	src/plugins/bineditor/BinEditor.pluginspec
	src/plugins/bookmarks/Bookmarks.pluginspec
	src/plugins/classview/ClassView.pluginspec
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec
	src/plugins/coreplugin/Core.pluginspec
	src/plugins/coreplugin/coreconstants.h
	src/plugins/cpaster/CodePaster.pluginspec
	src/plugins/cppeditor/CppEditor.pluginspec
	src/plugins/cpptools/CppTools.pluginspec
	src/plugins/cvs/CVS.pluginspec
	src/plugins/debugger/Debugger.pluginspec
	src/plugins/designer/Designer.pluginspec
	src/plugins/fakevim/FakeVim.pluginspec
	src/plugins/find/Find.pluginspec
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec
	src/plugins/git/ScmGit.pluginspec
	src/plugins/helloworld/HelloWorld.pluginspec
	src/plugins/help/Help.pluginspec
	src/plugins/imageviewer/ImageViewer.pluginspec
	src/plugins/locator/Locator.pluginspec
	src/plugins/mercurial/Mercurial.pluginspec
	src/plugins/perforce/Perforce.pluginspec
	src/plugins/projectexplorer/ProjectExplorer.pluginspec
	src/plugins/qmldesigner/QmlDesigner.pluginspec
	src/plugins/qmljseditor/QmlJSEditor.pluginspec
	src/plugins/qmljsinspector/QmlJSInspector.pluginspec
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
	src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec
	src/plugins/regexp/RegExp.pluginspec
	src/plugins/resourceeditor/ResourceEditor.pluginspec
	src/plugins/snippets/Snippets.pluginspec
	src/plugins/subversion/Subversion.pluginspec
	src/plugins/tasklist/TaskList.pluginspec
	src/plugins/texteditor/TextEditor.pluginspec
	src/plugins/vcsbase/VCSBase.pluginspec
	src/plugins/welcome/Welcome.pluginspec
parents dbb1c5ef a4640e36
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include <nodelistproperty.h> #include <nodelistproperty.h>
#include <toolbox.h> #include <toolbox.h>
#include <variantproperty.h> #include <variantproperty.h>
#include <rewritingexception.h>
#include <QtCore/QCoreApplication> #include <QtCore/QCoreApplication>
#include <QtCore/QDir> #include <QtCore/QDir>
...@@ -456,13 +457,17 @@ void DesignDocumentController::deleteSelected() ...@@ -456,13 +457,17 @@ void DesignDocumentController::deleteSelected()
if (!m_d->model) if (!m_d->model)
return; return;
if (m_d->formEditorView) { try {
RewriterTransaction transaction(m_d->formEditorView.data()); if (m_d->formEditorView) {
QList<ModelNode> toDelete = m_d->formEditorView->selectedModelNodes(); RewriterTransaction transaction(m_d->formEditorView.data());
foreach (ModelNode node, toDelete) { QList<ModelNode> toDelete = m_d->formEditorView->selectedModelNodes();
if (node.isValid() && !node.isRootNode() && QmlObjectNode(node).isValid()) foreach (ModelNode node, toDelete) {
QmlObjectNode(node).destroy(); if (node.isValid() && !node.isRootNode() && QmlObjectNode(node).isValid())
QmlObjectNode(node).destroy();
}
} }
} catch (RewritingException &e) {
QMessageBox::warning(0, tr("Error"), e.description());
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment