diff options
author | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2015-11-18 14:29:19 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@theqtcompany.com> | 2015-12-11 13:50:58 +0000 |
commit | 8fd05e6289a3190a9e1e5056ecff2a0e02aac2c2 (patch) | |
tree | 36a8af14d078ab5123946a68ae6c957f0893e4e0 /tests/auto/tools/qmake | |
parent | fda85b6d570702950e85d343745606c35ee02961 (diff) | |
download | qtbase-8fd05e6289a3190a9e1e5056ecff2a0e02aac2c2.tar.gz |
Don't ignore first character after a string.
The parser in QMakeSourceFileInfo::findDeps() would step over the
closing quote of a string, only to have a for loop then step over the
character just after that closing quote, which was thus never studied;
this could lead to problems in various ways. Fixed that and expanded
findDeps() test to catch regressions.
Task-number: QTBUG-17533
Change-Id: I7dec5222e38fa188495b39376ffee70bc7bbc87f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tests/auto/tools/qmake')
-rw-r--r-- | tests/auto/tools/qmake/testdata/findDeps/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/tools/qmake/testdata/findDeps/main.cpp b/tests/auto/tools/qmake/testdata/findDeps/main.cpp index 0df3f9b7c3..d5dd5b81d3 100644 --- a/tests/auto/tools/qmake/testdata/findDeps/main.cpp +++ b/tests/auto/tools/qmake/testdata/findDeps/main.cpp @@ -35,6 +35,9 @@ / #include "needed.cpp" // if not ignored, symbol needed() won't be available ... +// Check we're not confused by string juxtaposition: +static const char text[] = "lorem ""ipsum /*"; + #include <moc_object1.cpp> /**/ #include <moc_object2.cpp> /**//**/ #include <moc_object3.cpp> |