diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-09-29 11:25:57 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-10-01 12:41:10 +0200 |
commit | c8da53e6e23cce280d1ad518265003ee006bd6e0 (patch) | |
tree | 8603e4ff8d1fcf0b9940a0c44cab4cb966971423 | |
parent | d17e5dfd16aab7d0e0b14f11c383e975356a3c39 (diff) |
lupdate: Make good:proparsing test compilable
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>
10 files changed, 11 insertions, 18 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp index e7400ce28..0ae53bf58 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp @@ -25,10 +25,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello world", "Platform-independent file"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp index 7c00a19a7..f22036868 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp @@ -25,14 +25,11 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello macworld", "mac-only file"); } - - - diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp index 4274c6f72..3c4b313f0 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp @@ -25,10 +25,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello unixworld", "unix-only file"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp index a963f3eeb..018587851 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp @@ -25,10 +25,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello windowsworld", "Windows-only file"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.pro b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.pro index 7c6ad99dd..c6a970fae 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.pro @@ -1,6 +1,8 @@ # Try to reference a variable that does not exist: MYVAR=$$THIS_VARIABLE_IS_NOT_DEFINED +QT += widgets + SOURCES += main.cpp win32 { diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp index 2ac487555..e736754bc 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp @@ -25,14 +25,12 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> int main(int argc, char **argv) { QCoreApplication::tr("Hello from a VPATH", "See if the VPATH thing works"); } - - diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp index ed0cb245e..6a4fda499 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp @@ -25,10 +25,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello world", "wildcard/main1.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp index 895e9ffa4..c06762962 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp @@ -25,10 +25,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello world", "wildcard/main2.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp index 0f6694166..67a315a89 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp @@ -25,13 +25,11 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello world", "wildcard1.cpp"); } - - diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp index da6e45f2b..df6f68940 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp @@ -25,13 +25,11 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! +#include <QApplication> void func1() { QApplication::tr("Hello world", "wildcard99.cpp"); } - - |