As long as there are project parts for a source file, always determine
the best project part, instead of trying to stick to the previous one.
This ensures the best project part at all times and simplifies the code.
Change-Id: I25ea3eb43a5a3e6d93688d4b8965f596dc9ae22b
Reviewed-by: David Schulz <david.schulz@qt.io>
1. Open a project consisting of two subprojects referencing the same
source file.
2. Open the source file.
3. Click '#' in the editor toolbar and select the second project (part).
4. Update the project file, e.g. add a define
==> Editor does not reflect the added define
This is due to comparing project part pointers. Fix by using the project
part id that remains stable across project manager updates.
Change-Id: Ifd1a113e55ebe2ecf036cd7caafdbfd6e4cdf415
Reviewed-by: David Schulz <david.schulz@qt.io>
...instead of sticking to the old one.
If a project is closed, the editor should reflect that. It also simplifies the code.
Change-Id: I9b8a94513d3b06a238cfc4ee60c11c0d0da3d93f
Reviewed-by: David Schulz <david.schulz@qt.io>
Parse issues can have multiple reasons (invalid kit, not a project file,
actual parse issue) and we should be able to tell them apart. With this
change, we can distinguish between the fallback project part and a
ambiguous project part.
Follow up changes will use this to display more accurate diagnostics.
Change-Id: Icc8767607cc17dc14d6227b07f34e81ba5525a96
Reviewed-by: David Schulz <david.schulz@qt.io>
Thomas provided a smaller fix.
This reverts commit 78fb7f44bf.
Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We now support constexpr, noexcept and alignas on all compilers. Next will
be C++ 14 constexpr support.
Change-Id: I254049c60dcd82fc373ec907cbb5702a4b344978
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
...instead of C++ headers.
For the Clang Code Model this results in using "-x c-header" instead of
"-x c++-header".
This introduces a new option in Options > C++ > "Code Model" to
configure this.
Change-Id: I8a0ce8fa6155f5ef58743ebc7f1d0b500fbf6599
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The progress bar already disappears while we're still in Projects mode.
Change-Id: I7dcf24d1d423eba3057868c4323b2054c99d19f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Projects view has changed and so has functionality of adding a new kit.
Change-Id: I44377822b8b850fd17be24e12f7e5d0104be568d
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
realloc is not being listed by Clang Code Model
Task-number: QTCREATORBUG-17490
Change-Id: I006fee04579706fbf5edf8b890bd7be8e090d01f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Slow and very slow tests have now their own test category. We add SlowTest
for tests which are slower than ~5ms and VerySlowTest if they are slower
than ~100ms. They are disabled them by "-*SlowTest.*". If you have a faster
machine than most developers simply try lower values. The aim is that most
developers can execute the tests in under ~2s.
In the long run we should use dependency breaking and data sharing to
reduce the count of the slow tests.
Change-Id: I8578071258d7f89b2052709f3dd526ced811483f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Compilation doesn't fail since compileroptionsbuilder.h is indirectly
included before cpptoolsreuse.h.
Change-Id: I1f1b543a71546268e44fc9ec6c4a4530854e4659
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The type of a ModelNode can now be changed in the model.
The rewriter can already handle the case and the NodeInstanceView
does a reset.
We still have to expose this new feature in the UI.
Change-Id: I9bc405d40b123f257324ba582a4451fbd395f24f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Properties of the model indices did change recently and so
checking for enabled does no more work - use its toolTip
content instead to check for the enabled state.
Change-Id: Idc2b5ed1a0a14cfabdbdb4231eab243d28c0aee7
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
So we can easily verify if other changes break anything.
The disabled tests should be all related to the by default enabled delayed
template instantiation on Windows, which is necessary to parse windows headers.
The disabled tests can be run with --gtest_also_run_disabled_tests or by
setting the env variable GTEST_ALSO_RUN_DISABLED_TESTS=1.
Change-Id: I040d881ff0a3fbf5fe85c0b3d1b8e7b0959d1b9c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We do not allows ids like "text" and "item" anymore,
since they are ambiguous. This patch adjusts a couple of tests.
Change-Id: I93a1404c052a8f1d302c179141c6feb35e83afc8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...when selecting one for the editor document.
This flag is only set by the QmakeProject.
Change-Id: I648886e12148bd1ebeccca52d9faaf4b528597c9
Reviewed-by: David Schulz <david.schulz@qt.io>
Due to changed dependencies it is nowadays necessary to have more
of the plugin infrastructure at hand. Moving memcheck related tests
to be able to execute them as QC plugin unit test.
Change-Id: Iab492b3cb87728425b950ca9387edf292d895350
Reviewed-by: hjk <hjk@qt.io>
We used the same code in different but don't shared it. From a bug fixing
perspective it's actually not that smart.
Change-Id: Iaaffc883229e259ff77f95b5cf0a8f0d8b5117df
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>