diff options
author | Andy Shaw <andy.shaw@qt.io> | 2023-02-20 14:47:20 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2023-03-28 15:09:16 +0000 |
commit | a1b46788b7d2bf0117dbf63f4b4fedbc4a91eeb8 (patch) | |
tree | 59d3271b0a0c328a99bd52c04421e7115ed8ab8c /tests | |
parent | 34397930803f3d4648b868186cee2e6a593181cd (diff) | |
download | qttools-a1b46788b7d2bf0117dbf63f4b4fedbc4a91eeb8.tar.gz |
Don't treat enum classes as a normal class
The enum class construct can only be based on an integral type so they
can be skipped over safely.
Pick-to: 6.5
Task-number: QTBUG-36589
Change-Id: I9a7dd7508f80002e9e46429de726a75607d21a54
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp | 10 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index 43b493203..4af6fc9ba 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -718,3 +718,13 @@ class QTBUG110630 : QObject { tr("translation with extras-quoted field"); } }; + +// enum class - C++11 +enum class Bar : unsigned short; +// QTBUG-36589: Don't treat enum classes as a normal class +class QTBUG36589 : QObject { + Q_OBJECT + const QString txt() { + tr("string after an enum class"); + } +}; 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 bf3c20877..fe5c00d96 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -431,6 +431,14 @@ backslashed \ stuff.</source> </message> </context> <context> + <name>QTBUG36589</name> + <message> + <location filename="main.cpp" line="728"/> + <source>string after an enum class</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>QTBUG99415</name> <message> <location filename="main.cpp" line="707"/> |