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>
Starting with version 3.20 CMake adds -std:c++20, which breaks the
code model when using MSVC.
Clang-cl 12 doesn't know about -std:c++20, but clang driver knows
about -std=c++20.
Fixes: QTCREATORBUG-26146
Change-Id: I696842e11b0a9ba8849455d2f81f8dde6dd95a27
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It is caching the file size now too.
Task-number: QDS-4788
Change-Id: I5cb816b8359bf3d2ef372ea319ce5920d9e0e4e9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The watcher is only watching directories and then searches for file
stat changes. It is compressing signals too. So if files are changes
in a very short time frame they are compressed to one change.
Task-number: QDS-4776
Change-Id: I90052a0d5dba01467b505070fb58b04ea5576294
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Explicit type name ids are now saved as negative ids into the database
so they can be distingished by that 'flag'. For types we now use imports
and not anymore import ids. The resolving of the imports are done
internally to enable atomic synchronization.
Task-number: QDS-4662
Task-number: QDS-4725
Change-Id: Ia59763ec5578baec84f3c81fa1fd35ba075b8d84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Without libclang, or for the MSVC case when libclang has been built
with a different CRT. (release vs debug)
Change-Id: Ia1c5adbd1f9126efb95f1517c8ff274b5919c10e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Imports are now only updated for their source id. The source id is now
used as import id too.
Task-number: QDS-4724
Change-Id: I12988e9c19746291bbc26d5c80fc7dfdd33528e9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Merging the synchronization function into one function. This is needed
to exclude inconsistent states of the database.
Task-number: QDS-4715
Change-Id: I9915726d78d81a471c0494c584f141f011714c39
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
An exception is thrown if an alias cycle is detected. This prevents that
the designer would get in an endless loop.
Task-number: QDS-4682
Change-Id: Iffbfb42d7334aa2a5490fe2830b5cfab8c8e627a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
So far we push changes up to aliases. But because we have recursive
aliases we have to separate different phases off the declaration and
linking. First we simply declare. Later we set the alias ids and then we
can find out the alias property types. To minimize the changes we stick
to the push model.
AliasPropertyDeclaration was merged into PropertyDeclaration so that
Sqlite::insertUpdateDelete can be called on one sequence. This prevents
inconsistent states as aliases would be changed into properties and vice
versa.
Task-number: QDS-4654
Task-number: QDS-4711
Change-Id: I8459ab07fd6b30efa19cfd4bc335286a039a511f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
A cycle would lead to an endless loop. So we throw an exception for
synchronization. Maybe we can add later more information to user so
he can easily resolve the error.
Task-number: QDS-4457
Change-Id: I83092ccdff030a610942c155571a0bfa899e808c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Synchronization should always throw an exception if it gets in an
inconsitent state.
Task-number: QDS-4551
Change-Id: I8c55198115aa79b676a13fe0cd7ab225fb6723d5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Otherwise, we could introduce unwanted syntactical constructs, for
instance if the previous character is an asterisk.
Fixes: QTCREATORBUG-25966
Change-Id: Ic0b535861bc1cb4f5f93d06bb11d0f3c7c583893
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
There are still some corner cases but this will be done in follow-up
patches. The link information moved to the typenames table so only
indirections are saved in the propertyDeclarations table. Otherwise
the duplication would increase the database size too much.
Task-number: QDS-4551
Change-Id: I4aca85dd2d803b43aa9860183e500ced2d91141f
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The new version improves the mocking support quite a lot.
Change-Id: Ia59513ad251a084f8baca8178d9d5a9079bd63ef
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
There is optionalValue which can handle a null value. ints and floats
can be initialize to zero but you cannot be sure that this value comes
from the database, is a empty value. So it's better to force
the use of optionalValue for ints and floats. In that case empty has
to be handled.
Change-Id: Id5c5db57a8d3335d91911824d06f388ed054df9e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
- use of uninitialized value
- unused local typedef
Change-Id: I60d6c3a9a04d9f603a102439582c9e55d85a191f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Ups it to 2487 tests from 110 test suites.
(from 1963 tests from 91 test suites)
Change-Id: Id601bc8bbd43f129956be812e30a94081098c3cb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
tests/unit/CMakeLists.txt needs to be opened for standalone usage.
Change-Id: Ib763dedd09ee00bc793b56d87456981b71f4004c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We are still using our own Utils::variant and corresponding functions
on macOS.
Amends 90cc7fed3b
Change-Id: I829bdd3a4cc03f994a825ee3a962d4eb523a3bf1
Reviewed-by: Marco Bubke <marco.bubke@qt.io>