diff options
-rw-r--r-- | src/linguist/lupdate/cpp.cpp | 2 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp | 11 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result | 13 |
3 files changed, 24 insertions, 2 deletions
diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index adaed23de..d173da32f 100644 --- a/src/linguist/lupdate/cpp.cpp +++ b/src/linguist/lupdate/cpp.cpp @@ -1959,8 +1959,6 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac } else { notrfunc: prefix.clear(); - if (yyTok == Tok_Ident && !yyParenDepth) - prospectiveContext.clear(); } metaExpected = false; break; diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index 2dfcb5903..555549379 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -698,3 +698,14 @@ class Hogus : QObject { }; const QString Hogus::myString(QT_TR_NOOP("this should be in Hogus")); + + + +// QTBUG-99415: multiple specifiers after method parameter list +class QTBUG99415 : QObject { + Q_OBJECT + const QString text1() const noexcept { return tr("text1"); } + const QString text2() const noexcept; +}; + +const QString QTBUG99415::text2() const noexcept { return tr("text2"); } diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result index 50274e913..f21258d87 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -422,6 +422,19 @@ backslashed \ stuff.</source> </message> </context> <context> + <name>QTBUG99415</name> + <message> + <location filename="main.cpp" line="707"/> + <source>text1</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="main.cpp" line="711"/> + <source>text2</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>QTranslator</name> <message> <location filename="finddialog.cpp" line="168"/> |