The qmlpuppet is now a standalone tool. There is new a library too with
the communication code. That is shared between the designer and the
puppet. It's in a .cmake file so it can be included by the standalone
tool if it is not part of a designer build.
Task-number: QDS-5879
Change-Id: I2bc2a0b463fbb3e0c8c23d182abfd368cf87e968
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
All directories are searched for qml files and they are added to the
meta data. If the directory is changed the qmldir is always parsed even
if it was not changed. We can optimize that later but I think there is
no big advantage fot this optimization.
Task-number: QDS-5297
Change-Id: Ibe3102520bc18ac474380aad306486d8e25bc5db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
modelAboutToBeDetached can still calling the model. So calling the
function from inside the model destructor is a little bit undefined. To
get around it we add a custom delete which call the detachAllViews()
before it deletes the model.
Change-Id: I38ff8283f4e1ac48b256aeb9fd5bb9f3fb6bfed1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Too much maintenance effort for not enough gain.
Change-Id: Ica385bcc93da0dbc7af8e15c07fdd33580de29a7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
To improve testability external dependencies are now broken with an
interface. It is a first step to test individual units without injection
of source files.
Task-number: QDS-7571
Change-Id: I4255c8668022f1097947e4ea5788f2a6b605365d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@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>
IsSubClass is renamed to isBasedOn and takes now NodeMetaInfo as a
parameter. But for most cases there are is... functions as short cut.
The model is providing shortcut NodeMetaInfos too. This is done in the
sake of caching.
Task-number: QDS-7445
Change-Id: Iff2dea66e253b412105427134bd49cb16ed76193
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@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>
It return true if it is the same or a derived type. You can use multiple
base types.
Task-number: QDS-7424
Change-Id: I965a7c5b87ef0eb0183be1c705ebc18dee1943c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The ids are returned in order. There is no precedence between a
prototype or extension.
Task-number: QDS-7381
Change-Id: I38bce22067db93bbacaf9026c1dbb10363d2fb4f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We expect mostly a string view which has no null termination. Code which
depends on null termination is broken and it is better break early.
Change-Id: I7c2c41fb114e6aaf3a23053b522b37f7af5e1abf
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
There can be quite some copies with the swap method for the default case
that the string is inside the small string area. Instead now we minimize
copies of the smallstring area at the expense of more branches.
The swap approch needs no self tests and it uses the destructor to
remove allocated resources but it can copy three times more often. And
the destructor still has an additional branch in the copy case. Only in
the move case we can use the destructor of the other instance. This can
be surprising for some users which expect that the instance is empty
after a move(actually assuming that a instance is empty after a move is
undefined behavior).
Because SmallString is designed to hold the string in almost all cases
inside the small string area that case should be optimized.
Change-Id: I22cb62aa99b9713a221f103971f149c05e9ff6fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
So far the whole class was always copied. For a large SmallString
classes this were often many zeros if it was empty. Now only the non
zero area is copied in that case.
Change-Id: Ic0ea2d6f763513858a993bba3e829c9fc947e1a6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Using a value after the move is undefined. For example, if you move an
integer, it is not set to zero after the move. So you have to initialize
it again. Adding the take method to SmallString makes this explicit.
So if there is a case that you want to use the string again after
a move, use take or initialize it yourself.
Change-Id: I174116df9639d6a3f63c6f2c2a3bd184852927ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
By the way model is now using std::unique_ptr to make the model memory
management more robust.
Change-Id: Ie68508b1d99cea173f3b3171bbc6dedad4e871c3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The type traits contains already information like if the file is a file
component etc..
Task-number: QDS-7327
Change-Id: I7713840fd1107046e8a6710c0ca493dc54edf823
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We can save more data into that enumeration but the name should reflect
that.
Task-number: QDS-7327
Change-Id: I35a4e1460a6bbc63b32934828b766733a92c5ba7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Because ids are now handled directly by the sqlite statement the
shortcut to take the "address" of the id is deactivated and you have to
use some special functions.
Change-Id: I869f5d1688ab4b6794fb9ed3ffcaa3978a0fc516
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
An id is now always saved as a null value and a null value is always
converted to an invalid id if you are requesting an id. It prevents
accidental conversion of null values into a id with the value of zero.
It prevent too writing of the value -1 for an id. This has two
advantages. Sqlite can optimize null values if there are only null
values following in a row. And with strict tables it is forbidden to use
a null value as a key. So there can be no accidential invalid ids
anymore in the database.
Change-Id: I5ec813f2fe8e686324eab6dd632c03d5007e093d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Before you had to use an constructor which is has an integer as
parameter. Like
struct Foo
{
Foo{long long id} : id{id} {}
Foo{TypeId id} : id{id} {}
TypeId id;
}
Now you can write:
struct Foo
{
TypeId id;
}
With C++ 20 we can even remove more contructors.
Change-Id: I374505a037a71339b672f5f3a57b06dcf443b4bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
As we changed the MetaInfo interface we can return ids too but as an
intermediate step we return the sorted function names. Beware that the
sort is not matching the normal SmallString "<" operator because it is
not using size.
Task-number: QDS-7284
Change-Id: I96c6494d7c36f37d451d439be8aee35e0221f20b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
As we changed the MetaInfo interface we can return ids too but as an
intermediate step we return the sorted signal names. Beware that the
sort is not matching the normal SmallString "<" operator because it is
not using size.
Task-number: QDS-7283
Change-Id: I767a4d9f589d2bb2d2e29788be90d29dbd5ac1e3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Returns for a property declaration id the property declaration infos. If
there are no infos a null optional is returned.
Task-number: QDS-7278
Change-Id: I4faa158008130f00f31062bab94baa7f88d70edf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Because it is shared between different namespaces it is moved to the
parent namespace.
Change-Id: I43186bfa3b1b1d6bf95158aaf13b06e0c6bd64b5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The properties has to respect overloading. So it should chose the
nearest property declaration with the requested name.
Task-number: QDS-7280
Change-Id: I13ff9cf1f9389ec6b48c6e692368ef33795b61fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
It returns all properties of the type and the prototype chain in a
sorted order.
Task-nubmer: QDS-7276
Change-Id: I95c16abd16d9d0f1fdf68d3425780a888dc056b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The type id getter expects a valid module id, an exported name and
optionally a version.
Tsk-number: QDS-7271
Change-Id: I9af5f926b97606fc312eb1158367aba7105cdefb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Instead of creating a new cache for every collector we now use a
collector dispatcher which is dispatching the request to different
collectors.
Tsk-number: QDS-7258
Change-Id: I024622d4b757e1ff10f7cab4204d1742ef5926da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Some of our auto tests fail, so add an EXCLUDE_FROM_PRECHECK option for
add_qtc_test, which sets a corresponding label on the ctest, and exclude
these when running ctest on COIN.
Disable the Googletest based unittests for now, they are inconsistently
failing on CI, e.g. sometimes timing out after 60 seconds for tests that
usually take only a fraction of a second.
tst_perfdata from the perfparser submodule also fails. Temporarily
disable it explicitly, until the EXCLUDE_FROM_PRECHECK change can be
merged there.
Change-Id: I7e9d7aded75bbe8800f82f7aa125c181271a2a1f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>