diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-10-08 15:43:32 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 19:25:32 (GMT) |
commit | 811f22d44edc4e57236afef0803ff18504bfedf6 (patch) | |
tree | 3584cf37d8649cdc75133f917868c74f69363490 /tests/auto | |
parent | 31c6cbbe529c6fdbaf259f7ed87547db6dda7842 (diff) | |
download | Qt-811f22d44edc4e57236afef0803ff18504bfedf6.zip Qt-811f22d44edc4e57236afef0803ff18504bfedf6.tar.gz Qt-811f22d44edc4e57236afef0803ff18504bfedf6.tar.bz2 |
correctly resolve INCLUDEPATH relative to current project
Task-number: QTBUG-24587
Change-Id: I1384403e5c5e3313649fa4abb98e7578cae4677b
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/92020773c1739feb4dc240827271720f615431d0)
Diffstat (limited to 'tests/auto')
5 files changed, 123 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro index 13f9217..5ba3a1e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.pro @@ -1,3 +1,5 @@ TEMPLATE = subdirs comm.subdir = common SUBDIRS = win mac unix comm + +SUBDIRS += sub diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result index 6621de9..a0caaf1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result @@ -28,4 +28,12 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>nm::Test</name> + <message> + <location filename="sub/src/test.cpp" line="51"/> + <source>MyText</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/include/test.h b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/include/test.h new file mode 100644 index 0000000..00f4628 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/include/test.h @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $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 <QObject> + +namespace nm { + +class Test : public QObject { + Q_OBJECT + +public: + Test(); +}; + +} diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/src/test.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/src/test.cpp new file mode 100644 index 0000000..123a652 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/src/test.cpp @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $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 <test.h> + +using namespace nm; + +Test::Test() +{ + QString value = tr("MyText"); +} diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/sub.pro b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/sub.pro new file mode 100644 index 0000000..85c2c99 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/sub/sub.pro @@ -0,0 +1,5 @@ +INCLUDEPATH += include + +HEADERS += include/test.h + +SOURCES += src/test.cpp |