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>
This commit is contained in:
Alessandro Portale
2023-02-09 17:06:04 +01:00
parent 3c6b8b08df
commit ba34f00e1e
15 changed files with 77 additions and 252 deletions

View File

@@ -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