The tests expected diagnostics from source files only, but provided also
the ones from the header.
FAIL! : ClangTools::Internal::ClangToolsUnitTests::testProject(qt-widgets-app.qbs) Compared values are not the same
Actual (tool->diagnostics().count()): 4
Expected (expectedDiagCount) : 1
Loc: [/d1/creator/4.9/source/src/plugins/clangtools/clangtoolsunittests.cpp(133)]
FAIL! : ClangTools::Internal::ClangToolsUnitTests::testProject(qt-widgets-app.pro) Compared values are not the same
Actual (tool->diagnostics().count()): 4
Expected (expectedDiagCount) : 1
Loc: [/d1/creator/4.9/source/src/plugins/clangtools/clangtoolsunittests.cpp(133)]
Change-Id: I9270ba8cb554af3a3254e21d55656e73bcae71dd
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...for the qmake project manager.
When parsing the project files, remember whether a file was discovered
by the exact or cumulative parse. Only files that were discovered by the
exact parse are considered "active" and thus part of the build
configuration. The others are not offered for selection.
Fixes: QTCREATORBUG-16016
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I7a28b4de15e048975d7f0cd737dd8c11f744315b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Lifetime of the pointed-to object may end before that of
the plugin, so unique_ptr is the wrong choice.
This amends 01f2b982a2.
Change-Id: I76b9ac78348d2ae1e7eff0693b091dbe8475ab93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to the previous patch, but affecting more plugins: with dynamic
perspectives lifetime is better managed close to the code that knows how
to (re-)construct the items.
Change-Id: I0e7bfcf769d198ec2afa88b972be900baa1b6a46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diagnostics do not depend much on project parts. But
having the same file twice can result in duplicated
diagnostics which later can cause the same fix-it
being applied twice and getting corrupted code.
Change-Id: Ie2809af7a54034b05df9383875f7c3123aea58e8
Reviewed-by: David Schulz <david.schulz@qt.io>
If the run button is clicked, the user is prompted to select the files
for analysis.
Change-Id: I21e4ee6b7c14392a8c1a901ac7aa1c9c16e30f0d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
To reuse it for other clang-based tools.
Change-Id: I6c0d8e9eee543fa08faf3bf93c9fac33e43c6820
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>