diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2023-02-09 17:06:04 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2023-02-10 16:27:03 +0000 |
commit | ba34f00e1e67721cda2af8a2a2a436940b1e1e4a (patch) | |
tree | a59f4b79c51652b2914321c492ef8e00d36a5cf9 /src/plugins/modeleditor | |
parent | 3c6b8b08df9c5571f5eaed358262a818d66f3604 (diff) | |
download | qt-creator-ba34f00e1e67721cda2af8a2a2a436940b1e1e4a.tar.gz |
ModelEditor: Tr::tr()
Following orphaned contexts are merged into ::ModelEditor
ModelEditor::Internal::ActionHandler
ModelEditor::Internal::ElementTasks
ModelEditor::Internal::ExtPropertiesMView
ModelEditor::Internal::FileWizardFactory
ModelEditor::Internal::ModelDocument
ModelEditor::Internal::ModelEditor
ModelEditor::Internal::ModelsManager
ModelEditor::Internal::PxNodeController
Modeling
Change-Id: Ib602b91af7a4b8d8f886e587e6988338b1e841e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/modeleditor')
-rw-r--r-- | src/plugins/modeleditor/actionhandler.cpp | 33 | ||||
-rw-r--r-- | src/plugins/modeleditor/elementtasks.cpp | 7 | ||||
-rw-r--r-- | src/plugins/modeleditor/extpropertiesmview.cpp | 8 | ||||
-rw-r--r-- | src/plugins/modeleditor/modeldocument.cpp | 9 | ||||
-rw-r--r-- | src/plugins/modeleditor/modeleditor.cpp | 38 | ||||
-rw-r--r-- | src/plugins/modeleditor/modelsmanager.cpp | 5 | ||||
-rw-r--r-- | src/plugins/modeleditor/pxnodecontroller.cpp | 19 |
7 files changed, 63 insertions, 56 deletions
diff --git a/src/plugins/modeleditor/actionhandler.cpp b/src/plugins/modeleditor/actionhandler.cpp index 142dd3ad2e..8dbca707de 100644 --- a/src/plugins/modeleditor/actionhandler.cpp +++ b/src/plugins/modeleditor/actionhandler.cpp @@ -3,8 +3,9 @@ #include "actionhandler.h" -#include "modeleditor_constants.h" #include "modeleditor.h" +#include "modeleditor_constants.h" +#include "modeleditortr.h" #include <coreplugin/coreconstants.h> #include <coreplugin/actionmanager/actionmanager.h> @@ -120,26 +121,26 @@ void ActionHandler::createActions() d->pasteAction = registerCommand(Core::Constants::PASTE, &ModelEditor::paste, d->context)->action(); Core::Command *removeCommand = registerCommand( Constants::REMOVE_SELECTED_ELEMENTS, &ModelEditor::removeSelectedElements, d->context, - tr("&Remove"), QKeySequence::Delete); + Tr::tr("&Remove"), QKeySequence::Delete); medit->addAction(removeCommand, Core::Constants::G_EDIT_COPYPASTE); d->removeAction = removeCommand->action(); Core::Command *deleteCommand = registerCommand( Constants::DELETE_SELECTED_ELEMENTS, &ModelEditor::deleteSelectedElements, d->context, - tr("&Delete"), QKeySequence("Ctrl+D")); + Tr::tr("&Delete"), QKeySequence("Ctrl+D")); medit->addAction(deleteCommand, Core::Constants::G_EDIT_COPYPASTE); d->deleteAction = deleteCommand->action(); d->selectAllAction = registerCommand(Core::Constants::SELECTALL, &ModelEditor::selectAll, d->context)->action(); Core::Command *exportDiagramCommand = registerCommand( Constants::EXPORT_DIAGRAM, &ModelEditor::exportDiagram, d->context, - tr("Export Diagram...")); + Tr::tr("Export Diagram...")); exportDiagramCommand->setAttribute(Core::Command::CA_Hide); mfile->addAction(exportDiagramCommand, Core::Constants::G_FILE_EXPORT); d->exportDiagramAction = exportDiagramCommand->action(); Core::Command *exportSelectedElementsCommand = registerCommand( Constants::EXPORT_SELECTED_ELEMENTS, &ModelEditor::exportSelectedElements, d->context, - tr("Export Selected Elements...")); + Tr::tr("Export Selected Elements...")); exportSelectedElementsCommand->setAttribute(Core::Command::CA_Hide); mfile->addAction(exportSelectedElementsCommand, Core::Constants::G_FILE_EXPORT); d->exportSelectedElementsAction = exportSelectedElementsCommand->action(); @@ -150,34 +151,34 @@ void ActionHandler::createActions() d->openParentDiagramAction = registerCommand( Constants::OPEN_PARENT_DIAGRAM, &ModelEditor::openParentDiagram, Core::Context(), - tr("Open Parent Diagram"), QKeySequence("Ctrl+Shift+P"), + Tr::tr("Open Parent Diagram"), QKeySequence("Ctrl+Shift+P"), QIcon(":/modeleditor/up.png"))->action(); - registerCommand(Constants::ACTION_ADD_PACKAGE, nullptr, Core::Context(), tr("Add Package"), + registerCommand(Constants::ACTION_ADD_PACKAGE, nullptr, Core::Context(), Tr::tr("Add Package"), QKeySequence(), QIcon(":/modelinglib/48x48/package.png")); - registerCommand(Constants::ACTION_ADD_COMPONENT, nullptr, Core::Context(), tr("Add Component"), + registerCommand(Constants::ACTION_ADD_COMPONENT, nullptr, Core::Context(), Tr::tr("Add Component"), QKeySequence(), QIcon(":/modelinglib/48x48/component.png")); - registerCommand(Constants::ACTION_ADD_CLASS, nullptr, Core::Context(), tr("Add Class"), + registerCommand(Constants::ACTION_ADD_CLASS, nullptr, Core::Context(), Tr::tr("Add Class"), QKeySequence(), QIcon(":/modelinglib/48x48/class.png")); - registerCommand(Constants::ACTION_ADD_CANVAS_DIAGRAM, nullptr, Core::Context(), tr("Add Canvas Diagram"), + registerCommand(Constants::ACTION_ADD_CANVAS_DIAGRAM, nullptr, Core::Context(), Tr::tr("Add Canvas Diagram"), QKeySequence(), QIcon(":/modelinglib/48x48/canvas-diagram.png")); d->synchronizeBrowserAction = registerCommand( Constants::ACTION_SYNC_BROWSER, nullptr, Core::Context(), - tr("Synchronize Browser and Diagram") + "<br><i><small>" - + tr("Press && Hold for Options") + "</small></i>", QKeySequence(), + Tr::tr("Synchronize Browser and Diagram") + "<br><i><small>" + + Tr::tr("Press && Hold for Options") + "</small></i>", QKeySequence(), Utils::Icons::LINK_TOOLBAR.icon())->action(); d->synchronizeBrowserAction->setCheckable(true); - auto editPropertiesAction = new QAction(tr("Edit Element Properties"), + auto editPropertiesAction = new QAction(Tr::tr("Edit Element Properties"), Core::ICore::dialogParent()); Core::Command *editPropertiesCommand = Core::ActionManager::registerAction( editPropertiesAction, Constants::SHORTCUT_MODEL_EDITOR_EDIT_PROPERTIES, d->context); - editPropertiesCommand->setDefaultKeySequence(QKeySequence(tr("Shift+Return"))); + editPropertiesCommand->setDefaultKeySequence(QKeySequence(Tr::tr("Shift+Return"))); connect(editPropertiesAction, &QAction::triggered, this, &ActionHandler::onEditProperties); - auto editItemAction = new QAction(tr("Edit Item on Diagram"), Core::ICore::dialogParent()); + auto editItemAction = new QAction(Tr::tr("Edit Item on Diagram"), Core::ICore::dialogParent()); Core::Command *editItemCommand = Core::ActionManager::registerAction( editItemAction, Constants::SHORTCUT_MODEL_EDITOR_EDIT_ITEM, d->context); - editItemCommand->setDefaultKeySequence(QKeySequence(tr("Return"))); + editItemCommand->setDefaultKeySequence(QKeySequence(Tr::tr("Return"))); connect(editItemAction, &QAction::triggered, this, &ActionHandler::onEditItem); } diff --git a/src/plugins/modeleditor/elementtasks.cpp b/src/plugins/modeleditor/elementtasks.cpp index 819a41259a..e0efd6914a 100644 --- a/src/plugins/modeleditor/elementtasks.cpp +++ b/src/plugins/modeleditor/elementtasks.cpp @@ -3,10 +3,11 @@ #include "elementtasks.h" +#include "componentviewcontroller.h" +#include "modeleditor_plugin.h" +#include "modeleditortr.h" #include "modelsmanager.h" #include "openelementvisitor.h" -#include "modeleditor_plugin.h" -#include "componentviewcontroller.h" #include "qmt/diagram/delement.h" #include "qmt/diagram/dpackage.h" @@ -407,7 +408,7 @@ bool ElementTasks::extendContextMenu(const qmt::DElement *delement, const qmt::M { bool extended = false; if (dynamic_cast<const qmt::DPackage *>(delement)) { - menu->addAction(new qmt::ContextMenuAction(tr("Update Include Dependencies"), "updateIncludeDependencies", menu)); + menu->addAction(new qmt::ContextMenuAction(Tr::tr("Update Include Dependencies"), "updateIncludeDependencies", menu)); extended = true; } return extended; diff --git a/src/plugins/modeleditor/extpropertiesmview.cpp b/src/plugins/modeleditor/extpropertiesmview.cpp index 9b52d9fb63..4977d816b1 100644 --- a/src/plugins/modeleditor/extpropertiesmview.cpp +++ b/src/plugins/modeleditor/extpropertiesmview.cpp @@ -3,6 +3,8 @@ #include "extpropertiesmview.h" +#include "modeleditortr.h" + #include "qmt/model/mpackage.h" #include "qmt/project/project.h" #include "qmt/project_controller/projectcontroller.h" @@ -37,14 +39,14 @@ void ExtPropertiesMView::visitMPackage(const qmt::MPackage *package) qmt::Project *project = m_projectController->project(); if (!m_configPath) { m_configPath = new Utils::PathChooser(m_topWidget); - m_configPath->setPromptDialogTitle(tr("Select Custom Configuration Folder")); + m_configPath->setPromptDialogTitle(Tr::tr("Select Custom Configuration Folder")); m_configPath->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_configPath->setValidationFunction([=](Utils::FancyLineEdit *edit, QString *errorMessage) { return edit->text().isEmpty() || m_configPath->defaultValidationFunction()(edit, errorMessage); }); m_configPath->setInitialBrowsePathBackup( Utils::FilePath::fromString(project->fileName()).absolutePath()); - addRow(tr("Config path:"), m_configPath, "configpath"); + addRow(Tr::tr("Config path:"), m_configPath, "configpath"); connect(m_configPath, &Utils::PathChooser::textChanged, this, &ExtPropertiesMView::onConfigPathChanged); } @@ -88,7 +90,7 @@ void ExtPropertiesMView::onConfigPathChanged() } } if (modified && m_configPathInfo) - m_configPathInfo->setText(tr("<font color=red>Model file must be reloaded.</font>")); + m_configPathInfo->setText(Tr::tr("<font color=red>Model file must be reloaded.</font>")); } } // namespace Interal diff --git a/src/plugins/modeleditor/modeldocument.cpp b/src/plugins/modeleditor/modeldocument.cpp index b389c2dc89..341b9144bd 100644 --- a/src/plugins/modeleditor/modeldocument.cpp +++ b/src/plugins/modeleditor/modeldocument.cpp @@ -3,10 +3,11 @@ #include "modeldocument.h" +#include "extdocumentcontroller.h" #include "modeleditor_constants.h" #include "modeleditor_plugin.h" +#include "modeleditortr.h" #include "modelsmanager.h" -#include "extdocumentcontroller.h" #include "qmt/config/configcontroller.h" #include "qmt/infrastructure/ioexceptions.h" @@ -57,7 +58,7 @@ Core::IDocument::OpenResult ModelDocument::open(QString *errorString, bool ModelDocument::save(QString *errorString, const Utils::FilePath &filePath, bool autoSave) { if (!d->documentController) { - *errorString = tr("No model loaded. Cannot save."); + *errorString = Tr::tr("No model loaded. Cannot save."); return false; } @@ -107,7 +108,7 @@ bool ModelDocument::reload(QString *errorString, Core::IDocument::ReloadFlag fla *errorString = ex.errorMessage(); return false; } catch (const qmt::Exception &ex) { - *errorString = tr("Could not open \"%1\" for reading: %2.").arg(filePath().toString()).arg(ex.errorMessage()); + *errorString = Tr::tr("Could not open \"%1\" for reading: %2.").arg(filePath().toString()).arg(ex.errorMessage()); return false; } emit contentSet(); @@ -131,7 +132,7 @@ Core::IDocument::OpenResult ModelDocument::load(QString *errorString, const QStr *errorString = ex.errorMessage(); return OpenResult::ReadError; } catch (const qmt::Exception &ex) { - *errorString = tr("Could not open \"%1\" for reading: %2.").arg(fileName).arg(ex.errorMessage()); + *errorString = Tr::tr("Could not open \"%1\" for reading: %2.").arg(fileName).arg(ex.errorMessage()); return OpenResult::CannotHandle; } diff --git a/src/plugins/modeleditor/modeleditor.cpp b/src/plugins/modeleditor/modeleditor.cpp index 8443839d58..0229ceba00 100644 --- a/src/plugins/modeleditor/modeleditor.cpp +++ b/src/plugins/modeleditor/modeleditor.cpp @@ -233,7 +233,7 @@ void ModelEditor::init() d->noDiagramLabel = new QLabel(d->diagramStack); const QString placeholderText = - tr("<html><body style=\"color:#909090; font-size:14px\">" + Tr::tr("<html><body style=\"color:#909090; font-size:14px\">" "<div align='center'>" "<div style=\"font-size:20px\">Open a diagram</div>" "<table><tr><td>" @@ -333,13 +333,13 @@ void ModelEditor::init() syncToggleButton->setDefaultAction(d->actionHandler->synchronizeBrowserAction()); QMenu *syncMenu = new QMenu(syncToggleButton); QActionGroup *syncGroup = new QActionGroup(syncMenu); - d->syncBrowserWithDiagramAction = syncMenu->addAction(tr("Synchronize Structure with Diagram")); + d->syncBrowserWithDiagramAction = syncMenu->addAction(Tr::tr("Synchronize Structure with Diagram")); d->syncBrowserWithDiagramAction->setCheckable(true); d->syncBrowserWithDiagramAction->setActionGroup(syncGroup); - d->syncDiagramWithBrowserAction = syncMenu->addAction(tr("Synchronize Diagram with Structure")); + d->syncDiagramWithBrowserAction = syncMenu->addAction(Tr::tr("Synchronize Diagram with Structure")); d->syncDiagramWithBrowserAction->setCheckable(true); d->syncDiagramWithBrowserAction->setActionGroup(syncGroup); - d->syncEachOtherAction = syncMenu->addAction(tr("Keep Synchronized")); + d->syncEachOtherAction = syncMenu->addAction(Tr::tr("Keep Synchronized")); d->syncEachOtherAction->setCheckable(true); d->syncEachOtherAction->setActionGroup(syncGroup); syncToggleButton->setMenu(syncMenu); @@ -573,13 +573,13 @@ void ModelEditor::exportToImage(bool selectedElements) if (diagram) { if (d->lastExportDirPath.isEmpty()) d->lastExportDirPath = d->document->filePath().toFileInfo().canonicalPath(); - QString filter = tr("Images (*.png *.jpeg *.jpg *.tif *.tiff);;PDF (*.pdf)"); + QString filter = Tr::tr("Images (*.png *.jpeg *.jpg *.tif *.tiff);;PDF (*.pdf)"); #ifndef QT_NO_SVG - filter += tr(";;SVG (*.svg)"); + filter += Tr::tr(";;SVG (*.svg)"); #endif // QT_NO_SVG QString fileName = FileUtils::getSaveFilePath( nullptr, - selectedElements ? tr("Export Selected Elements") : tr("Export Diagram"), + selectedElements ? Tr::tr("Export Selected Elements") : Tr::tr("Export Diagram"), FilePath::fromString(d->lastExportDirPath), filter).toString(); if (!fileName.isEmpty()) { qmt::DocumentController *documentController = d->document->documentController(); @@ -602,11 +602,11 @@ void ModelEditor::exportToImage(bool selectedElements) if (success) d->lastExportDirPath = QFileInfo(fileName).canonicalPath(); else if (selectedElements) - QMessageBox::critical(Core::ICore::dialogParent(), tr("Exporting Selected Elements Failed"), - tr("Exporting the selected elements of the current diagram into file<br>\"%1\"<br>failed.").arg(fileName)); + QMessageBox::critical(Core::ICore::dialogParent(), Tr::tr("Exporting Selected Elements Failed"), + Tr::tr("Exporting the selected elements of the current diagram into file<br>\"%1\"<br>failed.").arg(fileName)); else - QMessageBox::critical(Core::ICore::dialogParent(), tr("Exporting Diagram Failed"), - tr("Exporting the diagram into file<br>\"%1\"<br>failed.").arg(fileName)); + QMessageBox::critical(Core::ICore::dialogParent(), Tr::tr("Exporting Diagram Failed"), + Tr::tr("Exporting the diagram into file<br>\"%1\"<br>failed.").arg(fileName)); } } } @@ -1096,7 +1096,7 @@ void ModelEditor::initToolbars() styleEngineElementType = qmt::StyleEngine::TypeSwimlane; } QIcon icon; - QString newElementName = tr("New %1").arg(tool.m_name); + QString newElementName = Tr::tr("New %1").arg(tool.m_name); if (!tool.m_stereotype.isEmpty() && stereotypeIconElement != qmt::StereotypeIcon::ElementAny) { const qmt::Style *style = documentController->styleController()->adaptStyle(styleEngineElementType); icon = stereotypeController->createIcon( @@ -1139,32 +1139,32 @@ void ModelEditor::initToolbars() toolBars.insert(generalId, toolBar); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/package.png"), - tr("Package"), tr("New Package"), QLatin1String(qmt::ELEMENT_TYPE_PACKAGE), + Tr::tr("Package"), Tr::tr("New Package"), QLatin1String(qmt::ELEMENT_TYPE_PACKAGE), QString(), toolBar)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/component.png"), - tr("Component"), tr("New Component"), QLatin1String(qmt::ELEMENT_TYPE_COMPONENT), + Tr::tr("Component"), Tr::tr("New Component"), QLatin1String(qmt::ELEMENT_TYPE_COMPONENT), QString(), toolBar)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/class.png"), - tr("Class"), tr("New Class"), QLatin1String(qmt::ELEMENT_TYPE_CLASS), + Tr::tr("Class"), Tr::tr("New Class"), QLatin1String(qmt::ELEMENT_TYPE_CLASS), QString(), toolBar)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/item.png"), - tr("Item"), tr("New Item"), QLatin1String(qmt::ELEMENT_TYPE_ITEM), + Tr::tr("Item"), Tr::tr("New Item"), QLatin1String(qmt::ELEMENT_TYPE_ITEM), QString(), toolBar)); toolBarLayout->addWidget(Layouting::createHr(d->leftToolBox)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/annotation.png"), - tr("Annotation"), QString(), QLatin1String(qmt::ELEMENT_TYPE_ANNOTATION), + Tr::tr("Annotation"), QString(), QLatin1String(qmt::ELEMENT_TYPE_ANNOTATION), QString(), toolBar)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/boundary.png"), - tr("Boundary"), QString(), QLatin1String(qmt::ELEMENT_TYPE_BOUNDARY), + Tr::tr("Boundary"), QString(), QLatin1String(qmt::ELEMENT_TYPE_BOUNDARY), QString(), toolBar)); toolBarLayout->addWidget( new DragTool(QIcon(":/modelinglib/48x48/swimlane.png"), - tr("Swimlane"), QString(), QLatin1String(qmt::ELEMENT_TYPE_SWIMLANE), + Tr::tr("Swimlane"), QString(), QLatin1String(qmt::ELEMENT_TYPE_SWIMLANE), QString(), toolBar)); } diff --git a/src/plugins/modeleditor/modelsmanager.cpp b/src/plugins/modeleditor/modelsmanager.cpp index 6b3e49fcad..787c5556fd 100644 --- a/src/plugins/modeleditor/modelsmanager.cpp +++ b/src/plugins/modeleditor/modelsmanager.cpp @@ -6,8 +6,9 @@ #include "diagramsviewmanager.h" #include "extdocumentcontroller.h" #include "modeldocument.h" -#include "modeleditor_constants.h" #include "modeleditor.h" +#include "modeleditor_constants.h" +#include "modeleditortr.h" #include "modelindexer.h" #include "pxnodecontroller.h" @@ -97,7 +98,7 @@ ModelsManager::ModelsManager(QObject *parent) ProjectExplorer::Constants::M_FOLDERCONTEXT); folderContainer->insertGroup(ProjectExplorer::Constants::G_FOLDER_FILES, Constants::EXPLORER_GROUP_MODELING); - d->openDiagramContextMenuItem = new QAction(tr("Open Diagram"), this); + d->openDiagramContextMenuItem = new QAction(Tr::tr("Open Diagram"), this); Core::Command *cmd = Core::ActionManager::registerAction( d->openDiagramContextMenuItem, Constants::ACTION_EXPLORER_OPEN_DIAGRAM, projectTreeContext); diff --git a/src/plugins/modeleditor/pxnodecontroller.cpp b/src/plugins/modeleditor/pxnodecontroller.cpp index 1338a79f93..d17e2232f8 100644 --- a/src/plugins/modeleditor/pxnodecontroller.cpp +++ b/src/plugins/modeleditor/pxnodecontroller.cpp @@ -3,11 +3,12 @@ #include "pxnodecontroller.h" -#include "pxnodeutilities.h" -#include "componentviewcontroller.h" #include "classviewcontroller.h" +#include "componentviewcontroller.h" +#include "modeleditortr.h" #include "modelutilities.h" #include "packageviewcontroller.h" +#include "pxnodeutilities.h" #include "qmt/model/mpackage.h" #include "qmt/model/mclass.h" @@ -134,7 +135,7 @@ void PxNodeController::addFileSystemEntry(const QString &filePath, int line, int QFileInfo fileInfo(filePath); if (fileInfo.exists() && fileInfo.isFile()) { auto menu = new QMenu; - menu->addAction(new MenuAction(tr("Add Component %1").arg(elementName), elementName, + menu->addAction(new MenuAction(Tr::tr("Add Component %1").arg(elementName), elementName, MenuAction::TYPE_ADD_COMPONENT, menu)); const QStringList classNames = Utils::toList( d->classViewController->findClassDeclarations( @@ -143,7 +144,7 @@ void PxNodeController::addFileSystemEntry(const QString &filePath, int line, int menu->addSeparator(); int index = 0; for (const QString &className : classNames) { - auto action = new MenuAction(tr("Add Class %1").arg(className), elementName, + auto action = new MenuAction(Tr::tr("Add Class %1").arg(className), elementName, MenuAction::TYPE_ADD_CLASS, index, menu); action->className = className; menu->addAction(action); @@ -161,15 +162,15 @@ void PxNodeController::addFileSystemEntry(const QString &filePath, int line, int // ignore line and column QString stereotype; auto menu = new QMenu; - auto action = new MenuAction(tr("Add Package %1").arg(elementName), elementName, + auto action = new MenuAction(Tr::tr("Add Package %1").arg(elementName), elementName, MenuAction::TYPE_ADD_PACKAGE, menu); action->packageStereotype = stereotype; menu->addAction(action); - action = new MenuAction(tr("Add Package and Diagram %1").arg(elementName), elementName, + action = new MenuAction(Tr::tr("Add Package and Diagram %1").arg(elementName), elementName, MenuAction::TYPE_ADD_PACKAGE_AND_DIAGRAM, menu); action->packageStereotype = stereotype; menu->addAction(action); - action = new MenuAction(tr("Add Component Model"), elementName, + action = new MenuAction(Tr::tr("Add Component Model"), elementName, MenuAction::TYPE_ADD_COMPONENT_MODEL, menu); action->packageStereotype = stereotype; menu->addAction(action); @@ -300,7 +301,7 @@ void PxNodeController::onMenuActionTriggered(PxNodeController::MenuAction *actio package->setName(action->elementName); if (!action->packageStereotype.isEmpty()) package->setStereotypes({action->packageStereotype}); - d->diagramSceneController->modelController()->undoController()->beginMergeSequence(tr("Create Component Model")); + d->diagramSceneController->modelController()->undoController()->beginMergeSequence(Tr::tr("Create Component Model")); QStringList relativeElements = qmt::NameController::buildElementsPath( d->pxnodeUtilities->calcRelativePath(filePath, d->anchorFolder), true); if (qmt::MObject *existingObject = d->pxnodeUtilities->findSameObject(relativeElements, package)) { @@ -321,7 +322,7 @@ void PxNodeController::onMenuActionTriggered(PxNodeController::MenuAction *actio } if (newObject) { - d->diagramSceneController->modelController()->undoController()->beginMergeSequence(tr("Drop Node")); + d->diagramSceneController->modelController()->undoController()->beginMergeSequence(Tr::tr("Drop Node")); qmt::MObject *parentForDiagram = nullptr; QStringList relativeElements = qmt::NameController::buildElementsPath( d->pxnodeUtilities->calcRelativePath(filePath, d->anchorFolder), |