summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljslink.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2023-01-24 14:39:05 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2023-02-01 13:48:12 +0000
commit17b28909a99cce2dc908ad2ffbb43a85539fa526 (patch)
tree9f30a1d7b1428d8fa9f8ff3acebf204237b47b5a /src/libs/qmljs/qmljslink.cpp
parentfc8b81f2cb0b8acb7cdeb6109539869d42dd7802 (diff)
downloadqt-creator-17b28909a99cce2dc908ad2ffbb43a85539fa526.tar.gz
QmlJS: Tr::Tr
Excluding the Qml parser, which needs to remain in sync with it's copy in Qt. Change-Id: I22f475f265dd74687e3239c4d6916c777798a447 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/libs/qmljs/qmljslink.cpp')
-rw-r--r--src/libs/qmljs/qmljslink.cpp43
1 files changed, 23 insertions, 20 deletions
diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp
index 4a690b6e66..5054ce5703 100644
--- a/src/libs/qmljs/qmljslink.cpp
+++ b/src/libs/qmljs/qmljslink.cpp
@@ -4,11 +4,13 @@
#include "qmljslink.h"
#include "parser/qmljsast_p.h"
-#include "qmljsdocument.h"
+
#include "qmljsbind.h"
-#include "qmljsutils.h"
-#include "qmljsmodelmanagerinterface.h"
#include "qmljsconstants.h"
+#include "qmljsdocument.h"
+#include "qmljsmodelmanagerinterface.h"
+#include "qmljstr.h"
+#include "qmljsutils.h"
#include <utils/algorithm.h>
#include <utils/filepath.h>
@@ -293,7 +295,7 @@ void LinkPrivate::populateImportedTypes(Imports *imports, const Document::Ptr &d
imports->setImportFailed();
if (info.ast()) {
error(doc, info.ast()->fileNameToken,
- Link::tr("File or directory not found."));
+ Tr::tr("File or directory not found."));
}
break;
default:
@@ -455,7 +457,7 @@ Import LinkPrivate::importNonFile(const Document::Ptr &doc, const ImportInfo &im
error(doc,
locationFromRange(importInfo.ast()->firstSourceLocation(),
importInfo.ast()->lastSourceLocation()),
- Link::tr(
+ Tr::tr(
"QML module not found (%1).\n\n"
"Import paths:\n"
"%2\n\n"
@@ -525,19 +527,19 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
if (!(optional || (toImport.flags & QmlDirParser::Import::Optional))) {
error(doc,
errorLoc,
- Link::tr("Implicit import '%1' of QML module '%2' not found.\n\n"
- "Import paths:\n"
- "%3\n\n"
- "For qmake projects, use the QML_IMPORT_PATH variable to add import "
- "paths.\n"
- "For Qbs projects, declare and set a qmlImportPaths property in "
- "your product "
- "to add import paths.\n"
- "For qmlproject projects, use the importPaths property to add "
- "import paths.\n"
- "For CMake projects, make sure QML_IMPORT_PATH variable is in "
- "CMakeCache.txt.\n")
- .arg(importName,
+ Tr::tr("Implicit import '%1' of QML module '%2' not found.\n\n"
+ "Import paths:\n"
+ "%3\n\n"
+ "For qmake projects, use the QML_IMPORT_PATH variable to add import "
+ "paths.\n"
+ "For Qbs projects, declare and set a qmlImportPaths property in "
+ "your product "
+ "to add import paths.\n"
+ "For qmlproject projects, use the importPaths property to add "
+ "import paths.\n"
+ "For CMake projects, make sure QML_IMPORT_PATH variable is in "
+ "CMakeCache.txt.\n")
+ .arg(importName,
importInfo.name(),
Utils::transform(m_importPaths, [](const Utils::FilePath &p) {
return p.toString();
@@ -569,8 +571,9 @@ bool LinkPrivate::importLibrary(const Document::Ptr &doc,
if (!optional && errorLoc.isValid()) {
appendDiagnostic(doc, DiagnosticMessage(
Severity::ReadingTypeInfoWarning, errorLoc,
- Link::tr("QML module contains C++ plugins, "
- "currently reading type information... %1").arg(import->info.name())));
+ Tr::tr("QML module contains C++ plugins, "
+ "currently reading type information... %1")
+ .arg(import->info.name())));
import->valid = false;
}
} else if (libraryInfo.pluginTypeInfoStatus() == LibraryInfo::DumpError