diff options
author | Lucie Gérard <lucie.gerard@qt.io> | 2023-10-16 16:17:15 +0200 |
---|---|---|
committer | Lucie Gérard <lucie.gerard@qt.io> | 2023-10-24 15:17:36 +0200 |
commit | fea93d94af6e64d83638868d23c8f02db3b329b8 (patch) | |
tree | e068ec072601f27604d3b3f98eff3d1242dbd122 /src/linguist/lupdate/qdeclarative.cpp | |
parent | cfbd2fc61e5817d35c98dd0b991b2eacda2a6e1f (diff) |
Remove setting context using TRANSLATOR comment in qml files
This method of setting context is not supported on the qml side
Change-Id: I4cdba41c99f77bbd5c6f3e921ed23057d3c63241
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/linguist/lupdate/qdeclarative.cpp')
-rw-r--r-- | src/linguist/lupdate/qdeclarative.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp index 4cc9b8b94..595ee7e7f 100644 --- a/src/linguist/lupdate/qdeclarative.cpp +++ b/src/linguist/lupdate/qdeclarative.cpp @@ -32,8 +32,6 @@ using namespace QQmlJS; using namespace Qt::StringLiterals; -static QString QmlMagicComment = u"TRANSLATOR"_s; - class FindTrCalls: protected AST::Visitor { public: @@ -377,29 +375,6 @@ void FindTrCalls::processComment(const SourceLocation &loc) ushort c; while ((c = chars[idx].unicode()) == ' ' || c == '\t' || c == '\r' || c == '\n') ++idx; - if (!memcmp(chars + idx, QmlMagicComment.unicode(), QmlMagicComment.size() * 2)) { - idx += QmlMagicComment.size(); - QString comment = QString(chars + idx, length - idx).simplified(); - int k = comment.indexOf(QLatin1Char(' ')); - if (k == -1) { - trcontext = comment; - } else { - trcontext = comment.left(k); - comment.remove(0, k + 1); - TranslatorMessage msg( - trcontext, QString(), - comment, QString(), - m_fileName, loc.startLine, QStringList(), - TranslatorMessage::Finished, /*plural=*/false); - msg.setExtraComment(extracomment.simplified()); - extracomment.clear(); - m_translator->append(msg); - m_translator->setExtras(extra); - extra.clear(); - } - - m_component = trcontext; - } } } |