summaryrefslogtreecommitdiff
path: root/tests/cppmodelmanager
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-05-15 11:45:30 +0200
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-05-23 08:37:36 +0200
commit0d9bf5e54308ee05c8e8da011c09b845c1d1297e (patch)
tree3668357393f01b6527cf596111dee7fd612ec79e /tests/cppmodelmanager
parent3e80f52414e097bbf81f059f1e6f7ead538105d3 (diff)
downloadqt-creator-0d9bf5e54308ee05c8e8da011c09b845c1d1297e.tar.gz
C++: Fix 'already seen files' when indexing
Resetting the environment (after each *.cpp file) did not clear the already seen files (m_included). Because of that the succeeding header files were not parsed correctly - the environments of the mistakenly already seen header files were not merged in. Note that this change slow downs the parsing/indexing of files to its original speed, as it was before the problematic commit (and it is in 2.7): commit 82e347095c4bdb7a6419d28798639e60591e3992 C++: Untangle include file resolving from loading. Task-number: QTCREATORBUG-9205 Change-Id: Iea57b7c59ea04a3c8843fd1291f4c375382958fc Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'tests/cppmodelmanager')
-rw-r--r--tests/cppmodelmanager/testdata_refresh/defines.h31
-rw-r--r--tests/cppmodelmanager/testdata_refresh/header.h33
-rw-r--r--tests/cppmodelmanager/testdata_refresh/source.cpp33
3 files changed, 97 insertions, 0 deletions
diff --git a/tests/cppmodelmanager/testdata_refresh/defines.h b/tests/cppmodelmanager/testdata_refresh/defines.h
new file mode 100644
index 0000000000..4563c017ed
--- /dev/null
+++ b/tests/cppmodelmanager/testdata_refresh/defines.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** 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.
+**
+****************************************************************************/
+
+
+#define FORWARD_DECLARE_CLASS(name) class name;
diff --git a/tests/cppmodelmanager/testdata_refresh/header.h b/tests/cppmodelmanager/testdata_refresh/header.h
new file mode 100644
index 0000000000..55ce0a2a4c
--- /dev/null
+++ b/tests/cppmodelmanager/testdata_refresh/header.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** 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.
+**
+****************************************************************************/
+
+
+#include "defines.h"
+
+FORWARD_DECLARE_CLASS(QAction)
diff --git a/tests/cppmodelmanager/testdata_refresh/source.cpp b/tests/cppmodelmanager/testdata_refresh/source.cpp
new file mode 100644
index 0000000000..55ce0a2a4c
--- /dev/null
+++ b/tests/cppmodelmanager/testdata_refresh/source.cpp
@@ -0,0 +1,33 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of Qt Creator.
+**
+** 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.
+**
+****************************************************************************/
+
+
+#include "defines.h"
+
+FORWARD_DECLARE_CLASS(QAction)