QmlDesigner: Change importAdded and importRemoved in importsChanged

This commit is contained in:
Marco Bubke
2011-02-10 15:44:40 +01:00
parent 1b3f8c57b4
commit e3376b6d8d
30 changed files with 94 additions and 140 deletions

View File

@@ -481,8 +481,7 @@ void DesignDocumentController::copySelected()
QScopedPointer<Model> model(Model::create("Qt/Rectangle"));
model->setMetaInfo(m_d->model->metaInfo());
model->setFileUrl(m_d->model->fileUrl());
foreach (const Import &import, m_d->model->imports())
model->addImport(import);
model->changeImports(m_d->model->imports(), QList<Import>());
Q_ASSERT(model);
@@ -578,8 +577,8 @@ void DesignDocumentController::paste()
QScopedPointer<Model> model(Model::create("empty"));
model->setMetaInfo(m_d->model->metaInfo());
model->setFileUrl(m_d->model->fileUrl());
foreach (const Import &import, m_d->model->imports())
model->addImport(import);
model->changeImports(m_d->model->imports(), QList<Import>());
Q_ASSERT(model);
if (!m_d->model)