Commit de610cac authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: crash fix for copy and paste

imports (in the model) are broken (regression)
Since I rely on working imports in copy and paste broke.

I hardcode 4.7 in this patch!

Reviewed-by: Kai Koehne
parent e59d0134
......@@ -455,7 +455,7 @@ void DesignDocumentController::deleteSelected()
void DesignDocumentController::copySelected()
QScopedPointer<Model> model(Model::create("Qt/Rectangle"));
QScopedPointer<Model> model(Model::create("import Qt 4.7; Qt/Rectangle"));
......@@ -170,8 +170,9 @@ void ModelMerger::replaceModel(const ModelNode &modelNode)
RewriterTransaction transaction(view()->beginRewriterTransaction());
foreach (const Import &import, modelNode.model()->imports())
foreach (const Import &import, modelNode.model()->imports()) {
//view()->model()->addImport(import); //###
ModelNode rootNode(view()->rootModelNode());
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