Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.
Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We synchronize the test tools now earlier and may
not have finished setting up the configuration of
the current project.
This means the project might have no valid target
yet.
Amends 481070d808.
Change-Id: Ic0c1817318a343e68587930c492397a6094a4ce2
Reviewed-by: David Schulz <david.schulz@qt.io>
Fixes restoring project settings with enabled test tools but
having globally disabled these.
We need to take the real active state for test tools into
account not only the global one.
Kind of enhances b99d7623f3.
Change-Id: I29c8cc4fff7c82140da41d3c85823d5980c96d9f
Reviewed-by: David Schulz <david.schulz@qt.io>
It is wrong to query the global active state when
adding test tools known to be active.
Change-Id: I89ab292e1a71b43757e6308fa4b4c584d62fe28b
Reviewed-by: David Schulz <david.schulz@qt.io>
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.
Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Still some missing bits as some QString members had different meanings
depending on their context.
Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
When the last item of a test got modified and gets a
different state than the rest of its siblings we failed
to set the resulting state of its parent to partially
checked.
Fixes: QTCREATORBUG-25702
Change-Id: I122b77b907dfa7fd14c31d8363b025254e0c115e
Reviewed-by: David Schulz <david.schulz@qt.io>
If the check state of a tree item changes due to closing
the project and there is no other project open we access
a nullptr.
Change-Id: Ib08031e19eaae0837d1dc0485a05756cd8d0c0dc
Reviewed-by: David Schulz <david.schulz@qt.io>
The casting provided by the asTest*() methods isn't made use of here, so
using the "data-oriented" type() method seems more expressive.
Change-Id: Ia3e1a28d126f096afed54eeb0d884c52332f4350
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
By having TestParseResults take ITestFramework rather than ITestBase as
parameter, some base->asFramework() casts can be avoided today which
could possibly fail in the future.
Moreover, it allows TestTreeItem to take ITestFramework rather than
ITestBase as parameter which improves type safety further. This shall be
done in a separate commit though.
Change-Id: I66594415d68c3423076a0830ecd11080d3b6c186
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Test tools only create ITestTreeItems, not TestTreeItems.
Change-Id: Idb20844b80e351d4f0a472e4b97b074797ad6f99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This effectively enables to handle ctest project wise instead
of just globally. So far only code based test frameworks could
be enabled or disabled by project.
Change-Id: I491f91119c3500131ca51af4d55b0e68d47debf0
Reviewed-by: David Schulz <david.schulz@qt.io>
... by assuming that active.keys() is a subset of
TestFrameworkManager::registeredFrameworks() which is used in the case
above. Also, TestFrameworkManager::registeredFrameworks() is already
sorted, as can be seen from the above case, too.
Change-Id: If82c8c998716fa56d6257d3ee0ec09c12d458bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Allows to move over some static casts to the base tree model.
Change-Id: I19e322714a6026771139eeb0ded4645afb45aabe
Reviewed-by: David Schulz <david.schulz@qt.io>
Ordering in container by pointer to memory doesn't make much sense.
QHash is faster for lookups in this case.
Change-Id: I0d4bdac7f5bb9afffdeaef70b99326547c080f55
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Preparation for separating handling of code based and
build system based tests.
Task-number: QTCREATORBUG-23332
Change-Id: I490af5f3157fd4a8cd07d976cdfd9e4503ade97b
Reviewed-by: David Schulz <david.schulz@qt.io>
Preparation for an additional simpler test configuration
which needs to have the same common base.
Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
Preparation for having separated test tree items with a
common base.
Change-Id: I3735f582cc96910e971f5a41c799cc0729a10a58
Reviewed-by: David Schulz <david.schulz@qt.io>
...and respectively inside the parse results which hold the
information that are used to create the items.
Change-Id: I78f7b5632df5d449d39fa03ffbf48036a138e337
Reviewed-by: David Schulz <david.schulz@qt.io>
...as soon a modification of the check states happens
instead of waiting for the next parsing to update.
Otherwise we might lose all changes that have been
made without a parse.
Change-Id: I33a92786742eb2b58c1cfcdb438412a2c5bbaed8
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid losing failed states of test while editing files
that trigger a re-parse and may drop the original item.
Change-Id: Ia66c7f61819d610cced42ff9f86449855b80da2a
Reviewed-by: David Schulz <david.schulz@qt.io>
Mark test tree items as failed for the last run
to be able to re-run them in an easier way.
Change-Id: I7ea3dcd16e5a02797d41f13e02b2fa95b857cf5e
Reviewed-by: David Schulz <david.schulz@qt.io>
Make it easier to switch between projects and restore
the former check states of the found test items if
we have these information.
Change-Id: I99a5357388c36aa8cce6f5f82184d6ab2a8bf6e8
Reviewed-by: David Schulz <david.schulz@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When reparsing while modifying a file it can happen that
the parse failed for some reason or did not provide full
information due to syntax errors the code model cannot cope
with.
This in turn can purge items from the test tree. Re-adding
the items in a later reparse had just added the item and
did not take care of (former) check states.
Add simple caching mechanism to keep track of check states
and use them if available.
Task-number: QTCREATORBUG-24099
Change-Id: I3ca04f5fd58810df71582972e6fe96a00cfc48f1
Reviewed-by: David Schulz <david.schulz@qt.io>
- sort frameworks at insertion time
- apply the 'static' pattern
- inline code from convenience functions that are only used once on
the caller side
Change-Id: Ic4a46ad9487c58b4dfd61658a6fccebb88a428a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Relying on the order of tests of the underlying tree
model is bad as we order the model for the user with a
QSortFilterProxyModel.
Using non-unique keys is not wise either.
Ensure the keys are unique to have reliable results.
Change-Id: I556371d018c16e7b03a8ec85d60afc850056a94a
Reviewed-by: David Schulz <david.schulz@qt.io>