summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata/good
Commit message (Collapse)AuthorAgeFilesLines
* lupdate: Make good:proparsing test compilableJoerg Bornemann2020-10-0110-18/+11
| | | | | | | | This is necessary to make this test pass with the clang-based lupdate. Task-number: QTBUG-87090 Change-Id: I1ea085c1d37375ffb161176f23fba51450986867 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Get rid of the QTextCodec dependency in linguistLars Knoll2020-05-182-2/+2
| | | | | Change-Id: I9f09578b816ff24a23e17b3255ac93c5eb7c321e Reviewed-by: Liang Qi <liang.qi@qt.io>
* Add lupdate test for Objective-C++ sourcesTor Arne Vestbø2020-04-023-0/+74
| | | | | | | | Change-Id: I3728a77d44798e5ab71c6f775f95821513be00fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-021-0/+2
|\ | | | | | | Change-Id: I5eb7c358e80cbd25b5bbab1ef03f781c16367b63
| * Test that extraction of translations works from .qrc files with QtQuickCompilerSimon Hausmann2019-05-091-0/+2
| | | | | | | | | | | | | | | | | | After commit f01e72a82b59c214ce4b0a6ecefb604bc66ddd3e in qtdeclarative, we can test this scenario now. Task-number: QTBUG-75501 Change-Id: I64baa98da6b17c24b1e309c4dc93525a4fa8d057 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-2420-16/+128
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qdoc/qmlmarkupvisitor.h src/qdoc/qmlvisitor.h tests/auto/qtattributionsscanner/testdata/good/expected.json Done-With: Kai Koehne <kai.koehne@qt.io> Change-Id: I180ee214d1e5999fc1279b092bd9214b6bf8f858
| * Convert \r into a numerical entityLucie Gerard2019-04-021-2/+2
| | | | | | | | | | | | Task-number: QTBUG-41562 Change-Id: If03df28095212f2ee9f74eeaf03c50a6f1203415 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * lupdate: Do not touch a translated file without target languageLucie Gerard2019-04-0218-14/+89
| | | | | | | | | | | | | | | | | | | | [ChangeLog][lupdate] lupdate will now generate an error if it is asked to update a .ts file with translations, but without a target language. This is to ensure that plural translations are not destroyed. Fixes: QTBUG-53775 Change-Id: I646c1f2ec42a32dbc1a4676ad784887613607b78 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Add forward looking after ColonLucie Gerard2019-04-012-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Colons seen are remembered in order to identify a member or base class identifier. In case of declaration of a bit field, the colon should be ignored. If it is not, unexpected behaviors compromise the resolution of the context, when the context is not explicit in the tr() function. To differentiate between colons in a member or base class identifier, and colons in a bit field, this patch implements a heuristic: We parse forward to either a '{', or a ';'. If it is a semicolon we assume it's a bit field, if it is a curved open bracket we assume the colon is for a member or base class identifier. Related auto test in case of bitfields declaration added. Task-number: QTBUG-55479 Change-Id: I2ca1124c192e4ab16fd449afc634a5de5023f481 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | QtTools: replace deprecated QLayout::margin() with contentsMargins()Christian Ehrlicher2019-02-113-3/+3
|/ | | | | | | | QLayout::margin()/setMargin() is deprecated - replace it with it's successors contentsMargins()/setContentsMargins() Change-Id: I8b6a36f3e0d0e00186a7d9cdf4827cf06f302235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* lupdate: Add support for parsing C++11 raw string literalsPalo Kisa2019-01-092-0/+57
| | | | | | | | | | | [ChangeLog][lupdate] Added support for parsing C++11 raw string literals Task-number: QTBUG-42736 Change-Id: Ia246c7e7208580182a1e0413bb38bc2c8ff3f61e Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* lupdate: don't abort on prf execution errorsv5.12.0-beta4Oswald Buddenhagen2018-10-291-0/+2
| | | | | | | | | we report all messages with a "WARNING:" prefix specifically to indicate that the errors aren't supposed to be actually fatal in this context. Fixes: QTBUG-62478 Change-Id: I010abf34a216993af0d33d614345f6f562f0a10e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add support for the new QT_TR*_N_NOOP() macro familyMateusz Starzycki2018-06-252-0/+42
| | | | | | Task-number: QTBUG-3945 Change-Id: Ia29d97adaaf47539a19bd544729663dc893c5c14 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* lupdate: add support for c++17 nested namespacesOswald Buddenhagen2018-04-202-0/+24
| | | | | | | | Task-number: QTBUG-63364 Started-by: Mateusz Starzycki <mstarzycki@gmail.com> Change-Id: I492eecdc11a97d3cd8adc4caf6f20e536fc83bf7 Reviewed-by: Mateusz Starzycki <mstarzycki@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add support for translation function aliases that are member expressionsSimon Hausmann2018-03-293-1/+13
| | | | | | | | | | | | | When traversing the AST for call expressions, it may happen that the base of the call expression is a field member expression instead of a plain identifier. For example with CustomTranslator.myTr() the base is a field member, with an identifier as base and myTr as name. We can construct a qualified name from that quite easily and this way support qualified tr aliases in qml files. Task-number: QTBUG-67278 Change-Id: I106243d8eed6d8cec75819a44942cf750de2829a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* lupdate: Read id attributes of .ui filesFriedemann Kleint2018-01-183-0/+79
| | | | | | Task-number: QTBUG-34610 Change-Id: I807752fc573b9e6965462f0cf4728673fe3f3c70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix licensingJani Heikkinen2017-05-035-54/+39
| | | | | | | | | | | | - Remove unused license files - Switch old LGPLv21 license headers with GPL-EXCEPT one - Switch old LGPL3 license headers with LGPL one Task-number: QTBUG-57147 Change-Id: I36a5b5b823cede544f43ac8349b5db27f8df6abc Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix lupdate to handle \u escapesEdward Welbourne2017-03-092-0/+14
| | | | | | | | | | It treated \u as u, which isn't correct. Instead, read the number following and convert, via QChar, to UTF-8 encoding in the byte array (that'll later be .fromUtf8()ed). Added a simple test-case. Task-number: QTBUG-35164 Change-Id: Ib23cc5e5fb98e6cb8715b4018545e40a40e271d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-0411-0/+185
|\ | | | | | | Change-Id: I4ee208f69bed72c480c636cb18f22fd88c02d1e5
| * lupdate: Add qrc resource file supportTakumi ASAKI2016-10-2511-0/+185
| | | | | | | | | | | | | | | | | | | | | | lupdate parses qrc files specified by the RESOURCES qmake variable or by command line options, and adds files in them as source files. [ChangeLog][lupdate] Added qrc resource file support Task-number: QTBUG-53206 Change-Id: Id7f952487ab11e062db9c5a419fb2ee3c4716740 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-022-0/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/designer/src/designer/qdesigner.cpp One side changed Q_OS_MAC -> Q_OS_MACOS; the other changed it to Q_OS_OSX and combined with Q_OS_WIN. Kept the latter. tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result One side added some XML next to where another made a local change. Change-Id: I812b55fbaccc85baa9856aedf90f9258428dfcab
| * Linguist: Fix lupdate includes without spacesMarko Kangas2016-06-292-0/+18
| | | | | | | | | | | | | | | | | | | | Fixed lupdate to support includes without spaces before filename. Task-number: QTBUG-34092 Change-Id: If6b8d2b6941c9ea0084900ba14c81e261c0600cb Reviewed-by: Jan Kundrát <jkt@kde.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Updated license headers and license testsAntti Kokko2016-06-10123-1708/+1326
|/ | | | | | | | | | | | | From Qt 5.7 -> tools & applications are licensed under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) License header tests also updated to match current headers. Change-Id: Ia6bdacaa3c5bbc9d31334e1a0cabfe502a484dc4 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* lupdate: Fix parsing of class template specializationsKai Pastor2016-05-272-0/+25
| | | | | | | | | | | | | | | | | | | | 4ea581c95ae9704b250591c5d4d9b0517f5b62f2 introduced a bug where class template specialization would lead to contexts not being properly cleaned up on '}'. The occurrence of class template specializations lead to a massive slowdown in parsing following includes because they were treated as direct (in-namespace) and parsed more often than normally needed. Unfortunately the bug was not discovered early by the auto tests, but eventually the slowdown appeared in CI when merging to dev. This change adds a test for class template specializations. It would discover the cause (broken context) which triggers the slowdown but doesn't depend on includes. Task-number: QTBUG-53644 Change-Id: I94cce58702b53dfb5e0f9c92585222dd3f938593 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* lupdate: Explicitly handle C++ member initializer listsKai Pastor2016-04-283-0/+189
| | | | | | | | | | | | | | | This change makes the cpp parser explicitly deal with parens and braces in member initializer lists of constructors. It fixes problems with C++11 syntax like list-initialization and lambdas. It adds auto tests for tr() calls in initialization expressions. The combination of parens in base class template parameters with list initialization (braces) remains unsupported. Task-number: QTBUG-34128 Task-number: QTBUG-42166 Change-Id: Id4ac0a011fcda8d2b72a15348a1b96fdd492ab32 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* lupdate: Treat NULL and Q_NULLPTR like literal 0Kai Pastor2016-04-122-0/+23
| | | | | | | Task-number: QTBUG-34265 Change-Id: I2b69d7c6bc0514977cee9dd50a0c861e46dc589b Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* lupdate: Treat nullptr like literal 0Kai Pastor2016-03-152-0/+46
| | | | | | | | | lupdate parses C++ just for extracting strings which are to be translated. For this purpose, a nullptr is equivalent to a literal 0. Task-number: QTBUG-47467 Change-Id: Iecf73ef25802e4d9b99abff156546e6caed88b3e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* lupdate: Handle translation comments in ternary expressionsMichael Hanselmann2016-01-152-0/+90
| | | | | | | | | | | When the condition in a ternary operator expression was anything more than a single identifier translation comments were not recognized for translations within the values. Re-enabling translator comment detection after the question mark fixes that. Task-number: QTBUG-48776 Change-Id: I83bb9efaab42c52fc05a39094060eb0a1fb76d94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* lupdate: Support for C++11's "final" identifierMichael Hanselmann2016-01-052-0/+58
| | | | | | | | | | | | | | | | | | C++11 introduced the "final" identifier which may appear immediately after the name in a class definition to specify that the class cannot be derived from. lupdate collects strings for translation and did not understand "final". Instead it would use "final" as the name of the class as there may be attributes before the class name and the last token before the colon character is used. [ChangeLog][lupdate] The C++11 identifier "final" is now skipped when determining the name of a class. Task-number: QTBUG-42735 Change-Id: I2adee9a188645622fc6916158ba2b48dde921383 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-05-252-0/+23
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I47fe486745efad44537255a56087f4ec0a3b2e82
| * update message index when message gains source textOswald Buddenhagen2015-04-302-0/+23
| | | | | | | | | | | | | | | | | | | | when a message which is first seen with only an id later gains a source text, this text would not have been indexed. so a subsequent new message with the same source, but without an id this time around, would not be seen as a dupe of the first message. Change-Id: Ib35f820e2b02311ea9c9996383a2789095098d6f Reviewed-by: hjk <hjk@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-03-173-1/+14
|\| | | | | | | Change-Id: I5a49f9e755d85ea160fcf2ccfbc691ce0c17b458
| * Fix warning in correct uses of QCoreApplication::translateAlbert Astals Cid2015-03-063-1/+14
| | | | | | | | | | | | | | | | It was emitting the warning for "Unsupported Latin1" in the case it was a valid plural form too Change-Id: I22c9c15d50488810e3ff5d7b132aebd994b08ebf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | lupdate: Remove wrong error messagev5.5.0-alpha1Jan Arve Saether2015-03-113-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | For qsTr(), when string is not literal we printed a warning saying "text to translate must be a literal string". This was not correct, as it has never been a requirement for the string to be a _literal_ string. The solution is to remove the message entirely. Task-number: QTBUG-42381 Change-Id: If08726143c810382feb0a1c5db5036d9601ce488 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-1477-538/+538
|/ | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7f14f408e04c5c4f73a913fae153adcffbebe38f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-09-25123-1846/+1230
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: I23ef9591f4d9054e0b6a252ba7767baf4189aeab Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* correctly resolve INCLUDEPATH relative to current projectOswald Buddenhagen2013-10-105-0/+123
| | | | | | | Task-number: QTBUG-24587 Change-Id: I1384403e5c5e3313649fa4abb98e7578cae4677b Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add missing fileOswald Buddenhagen2013-10-011-0/+42
| | | | | | | | amends 35139d45 Change-Id: I53a65e9410a7c6bcd3d28c3b4b416d275679436f Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-273-3/+7
|\ | | | | | | Change-Id: I5db3f62185e7e99ce2c701debd00a44f40a9f5e5
| * make TR_EXCLUDE work for #include statements as wellOswald Buddenhagen2013-08-192-1/+4
| | | | | | | | | | | | Change-Id: I299043c63c6e8b2f24eeee7d3f03a514b96bca5f Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * execute some loops even in cumulative modeOswald Buddenhagen2013-08-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we execute foreach loops now. this is (mostly) safe nowadays, because a previous change added precautions against exponential value list growth, so it's unlikely that two nested loops would keep the cpu busy for a day as before. we continue to exclude forever loops and loops with excessive integer counts. Task-number: QTBUG-8550 Change-Id: Iaa116086986cc7fd5023834753f791dd205102e5 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | collect messages from INSTALL and DEPLOYMENT file listsOswald Buddenhagen2013-08-275-0/+160
| | | | | | | | | | | | | | Task-number: QTBUG-14056 Change-Id: I1e014885f92b8587462d926e552834915fc1be60 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | fix arguments of main() in test dataOswald Buddenhagen2013-08-273-3/+3
| | | | | | | | | | | | | | not that it would matter, but ... Change-Id: I798eb118e623cf22c7288cda7b5d806eba8a6065 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-1253-118/+157
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/linguist/lupdate/cpp.cpp Change-Id: Id27ac2ea8438e60a940d4ae3719ad393d7ad88ea
| * fix strings from #included sources not being collectedOswald Buddenhagen2013-08-073-0/+52
| | | | | | | | | | | | | | Task-number: QTBUG-27974 Change-Id: I30edae2db5449605984a118458b1ccce7ad67eb1 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * make TR_EXCLUDE work for SUBDIRSOswald Buddenhagen2013-08-073-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | this is needed for excluding subprojects we have no direct control over, e.g., git submodules. note that unlike TR_EXCLUDE for files, this matches SUBDIRS entries, not actual project file names. wildcards also work, though. Change-Id: I1d0a0410a28af4a60f045ee5bbac34540c14f0bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * purge pointless QT_DISABLE_DEPRECATED_BEFORE=0Oswald Buddenhagen2013-08-0741-42/+0
| | | | | | | | | | | | | | neither the tool test code nor the lupdate test data need any of it. Change-Id: I7604596f17308f7d49850f683b8ab84a0bc88131 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * remove dead filesOswald Buddenhagen2013-08-062-152/+0
| | | | | | | | | | | | Change-Id: I3735795bc51ad42ff7ad242221ef1dd174d882f1 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * don't ignore changes to meta data when updating translation unitsOswald Buddenhagen2013-08-063-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-18890 Change-Id: Iceb466105d5fae56da0e2d26cb245fa610fed865 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * de-duplicate extra comments when adding a message multiple timesOswald Buddenhagen2013-08-062-0/+6
| | | | | | | | | | | | Change-Id: I1ed80166be3cb53f865c083b0a693148b6000731 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>