diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-11-27 00:46:44 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-11-27 04:42:33 +0100 |
commit | 3198bd4e3c7086d4ea112339107eade27a1db58e (patch) | |
tree | 5e46acf996b96a095cfbca13de7c1da08763673c /examples/uml/duse-mt | |
parent | dccc32006217247d6105a64f5e2e2239d69943e5 (diff) |
Fix implementation of clone() operation. Update metamodels.
UML update coming soon.
Change-Id: I49e37052e9090aa9056c85e89bab1386c0f043fd
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'examples/uml/duse-mt')
-rw-r--r-- | examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp index d6b214e7..7950d10a 100644 --- a/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp +++ b/examples/uml/duse-mt/src/plugins/designspaceexplorer/designspaceexplorerplugin.cpp @@ -309,14 +309,17 @@ void DesignSpaceExplorerPlugin::openDuseDesign() void DesignSpaceExplorerPlugin::designSpaceChanged() { -// qDeleteAll(_currentDesignSpaceLocation); - QXmiReader reader; - QFile inputModel(_newDuseDesignDialog->_inputModelFileName); - if (!inputModel.open(QFile::ReadOnly | QFile::Text)) { - QMessageBox::critical(0, tr("Create new DuSE design"), tr("Cannot read file %1").arg(_newDuseDesignDialog->_inputModelFileName)); - return; - } - _currentDesignSpaceLocation = reader.readFile(&inputModel); + qDeleteAll(_currentDesignSpaceLocation); +// QXmiReader reader; +// QFile inputModel(_newDuseDesignDialog->_inputModelFileName); +// if (!inputModel.open(QFile::ReadOnly | QFile::Text)) { +// QMessageBox::critical(0, tr("Create new DuSE design"), tr("Cannot read file %1").arg(_newDuseDesignDialog->_inputModelFileName)); +// return; +// } +// _currentDesignSpaceLocation = reader.readFile(&inputModel); + foreach (QModelingElement *element, _core->projectController()->currentModelElements()) + _currentDesignSpaceLocation << element->clone(); + QList<QModelingObject *> currentModelObjects; foreach (QModelingElement *element, _currentDesignSpaceLocation) currentModelObjects << element->asQModelingObject(); |