Commit Graph

6274 Commits

Author SHA1 Message Date
Marco Bubke
e9407c23fa QmlDesigner: Relink prototypes
Task-number: QDS-4552
Change-Id: Ibb0d0048c114e100c215493bc9d633d4dbe3c4e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-14 10:44:57 +00:00
Marco Bubke
32fd70ce3c QmlDesigner: Handle more corner cases for alias relinking
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>
2021-07-14 10:44:52 +00:00
Eike Ziller
f08bd9df91 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Iba1e6cacaebf9bb4653ac77e981ddacaf729c52c
2021-07-14 12:20:35 +02:00
Tim Jenssen
453f4996db use "qml" as QML runtime
Since Qt 6.2 qmlscene is deprecated by Qt.

This patch also removes QMLViewer as a last
QtQuick 1 artifact in external tools.

Task-number: QDS-639
Task-number: QDS-4535
Task-number: QTCREATORBUG-22385
Change-Id: I5f67040954f8ef438961f7166a53bd96d5b73f4d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-13 15:38:46 +00:00
Christian Stenger
0eb2d62b0a Tests: Fix linking qmake build on Linux and macOS
Change-Id: I11f0d94bc2d921f184cd8948ac47f39232c215cf
Reviewed-by: hjk <hjk@qt.io>
2021-07-12 06:36:19 +00:00
Eike Ziller
e45eaf500c Merge remote-tracking branch 'origin/5.0'
Change-Id: I9dca34a9895d19ace05aef5b73e9a806b23607fb
2021-07-09 14:11:59 +02:00
Christian Stenger
39b8501fa1 Unittest: Fix compile when building standalone
Amends 58d00f37d4.

Change-Id: Iafd5b1c4f78077ae75f17ca7b315916e10916a1b
Reviewed-by: hjk <hjk@qt.io>
2021-07-09 06:25:32 +00:00
Eike Ziller
9692af87a2 Merge remote-tracking branch 'origin/4.15' into 5.0
Change-Id: Id5c2ab312272eba0ef8c0eb7b26f58913dce0723
2021-07-08 11:44:48 +02:00
Eike Ziller
1d05a2b5af Merge remote-tracking branch 'origin/5.0'
Change-Id: Icea9215204a7247c5fbbc818833132676a3b9e11
2021-07-06 16:00:14 +02:00
hjk
7a6c099c08 Nim: Use remote device when searching compilers there
Change-Id: Iab1cb1dbaaf789d2ad328ab70c3dec8839d4ffcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-06 07:35:56 +00:00
Christian Kandeler
8cc4bbe4d8 ClangFormat: Prepend a space character to our inserted line comment
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>
2021-07-05 15:44:51 +00:00
Marco Bubke
b1fcc4b7a0 QmlDesigner: Relink alias properties
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>
2021-07-05 12:40:49 +00:00
Christian Kandeler
f248d0a737 ClangFormat: Add xfailing unit test
Task-number: QTCREATORBUG-25966
Change-Id: If8f28bd5195f2681cca209b41bcc93fad0695541
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 11:26:09 +00:00
Robert Löhning
770182653c Squish: Add parentheses around all print statements
Required by Python 3.

Change-Id: Ia28491882a844d3642da38145b1ebfcfbd5883b3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 10:31:19 +00:00
Marco Bubke
8f4a06664f UnitTests: Update to google test 1.11
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>
2021-07-05 10:28:57 +00:00
Robert Löhning
c8b176c9a7 Squish: Stabilize tst_HELP02
On Windows, the shortcut gets lost when
clicking "Stop Recording" too quickly.

Change-Id: Ieb89b7f59ded0792bf09fbad0b4b44a78d369c0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 09:25:31 +00:00
Orgad Shaneh
84839ee397 Merge remote-tracking branch 'origin/5.0'
Change-Id: Ia018600fb257c9523fc9d15faa5bd8300840e3de
2021-07-05 12:17:45 +03:00
Christian Kandeler
32f46e55ed CppTools: Move ProjectPartChooser tests into the plugin
Change-Id: Ic2ef95d4d6a5bd65cbc611b66a0b297c7468bbcb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-05 07:38:10 +00:00
Christian Kandeler
01a6e40377 Unit test: Fix qbs build with internal gtest
Change-Id: Ied99b436ae234e7be3944e71d0f6d13fc5f7b2f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 13:29:02 +00:00
Christian Kandeler
85797068bb CppTools: Move CompilerOptionsBuilder tests to plugin
... where they belong.

Change-Id: Ifc6aebc218f9f85ffeb6a4b7121f97379b53b69d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 13:12:54 +00:00
Christian Stenger
8747e2fe1f Unittest: Fix compile
Amends a58dd22f2d.

Change-Id: I85978b4cc39c633f882c22f74335f11b0dfdfe09
Reviewed-by: hjk <hjk@qt.io>
2021-07-02 08:16:19 +00:00
hjk
39707a4258 Docker: Add a README for the manual test
Change-Id: I588d525d06be33ebb5eb1b9b927c4488aeba0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:14:05 +00:00
Marco Bubke
31ee498ab9 UnitTests: Remove deleted file from .pro
Change-Id: If09216c281f8186ae03c59c685653faa6dbdcd89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-07-01 11:33:02 +00:00
Alessandro Portale
bf6f446a35 Tracing: Fix build of tst_flamegraphview.cpp
Change faulty include from system to local

amends: 3ebe5dbb99

Change-Id: I466e683137b5e95f5b70fb2efa3dda1a77af8a04
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-29 05:51:29 +00:00
Alessandro Portale
3ebe5dbb99 Tracing: Use qt_add_qml_module for tst_flamegraphview
Use the CMake-based qml API to create the
"QtCreator.TstTracingFlameGraphView" module.
This uses qt_add_qml_module, which was introduced with Qt 6.2.

For Qt 6.1 and below, everything compiles and runs like before this
change.

Change-Id: I7b1d7109c5fcff55c7be4b431f21281a63d13332
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-28 15:06:39 +00:00
The Qt Project
35b169f466 Merge "Merge remote-tracking branch 'origin/5.0'" 2021-06-28 09:41:13 +00:00
Marco Bubke
091c7a0093 Sqlite: Disable value method for fundamentals
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>
2021-06-28 08:08:59 +00:00
Christian Kandeler
627dd6681b Sqlite: Fix warnings
- 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>
2021-06-24 12:07:48 +00:00
Bernhard Beschow
116db82720 Fix qmake build
Ammends commit 770d87709e.

Change-Id: I5dc0d4ca821a7da8c8a14a56ce4f885176314be0
Reviewed-by: hjk <hjk@qt.io>
2021-06-24 07:08:05 +00:00
hjk
430e81facd All: Replace most SynchronousProcess by QtcProcess
Change-Id: I0bf22fef2cd4a7297ef5a1e9aa9c3e2b9348ba42
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 07:55:31 +00:00
Alessandro Portale
a56ce4e450 Tracing: Add qml, register types via qt_add_qml_module
Use the CMake-based qml API to create the "QtCreator.Tracing" module.
This uses qt_add_qml_module, which was introduced with Qt 6.2.

For Qt 6.1 and below, everything compiles and runs like before this
change.

Change-Id: I4d63f9f724d0628cfaab9d1164c0d575f15d15aa
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-22 11:58:05 +00:00
Eike Ziller
90018718b0 Merge remote-tracking branch 'origin/4.15'
Change-Id: I70bfc8c68794d27a97e58a174187762fba872142
2021-06-22 09:19:03 +02:00
Jarek Kobus
fe7b5458eb Refactor tst_joinAllThreads, to be used in ModelManager d'tor
The idea in this approach is that we only collect those futures,
which have resulted from runAsync. The assumption is that
all tasks associated with those futures may sooner or
later finish, without the need to call qApp->processEvents().

OTOH, we don't collect fake futures coming from Utils::onFinished,
as these requires the spinning event loop in order to deliver
the onFinished signal.

So, the new joinAllThreads() method waits for all collected
futures to finish. We also _do_ want canceled and not finished
futures to finish, since even when they are canceled,
they may still be running and using the internals
of possibly destructed ModelManager. This means, we are only
waiting for other threads to be finished, without reporting
their results to e.g. onFinished() handlers.

Some tests require that all onFinished handlers are also processed.
In order to achieve this, we create a loop inside
tst_joinAllThreads() method and we call joinAllThreads(), so
it will wait for all pending queue to finish, and then we call process
events, in order to let finished futures propagate their results
to their respective onFinished() handlers.
Some handlers may have stared another threads when being processed,
so we may expect that some new futures will appear.
So, after processing the events we check if any new events
appeared, and in this case we repeat the loop.
Otherwise, we finish synchronization.

Amends: 96c860159b

Task-number: QTCREATORBUG-25350
Change-Id: I5e44150c55f6be00445a5695938482d948990c94
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-06-21 12:19:17 +00:00
Christian Stenger
ae8d9af6f4 Squish: Fix expectations
The output on finishing debugging had changed.

Change-Id: I8193718594c0aceef13867d6acd1c8c0aaba6353
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-06-21 11:12:21 +00:00
hjk
ada39349a2 Utils: Merge QtcProcess line reading functions
- Pass everything through the codec.
- Always emit even incomplete last lines when the process finishes.
- Don't store raw output when line-wise processing is requested.

Change-Id: I5cc30ad0d7ab79387bfb00b48ff957468a1bd004
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 10:59:40 +00:00
Thomas Hartmann
e1c90bf047 QmlDesigner: Extend tst_TestCore::loadQml()
We should check for the version. For this we have to enable
semantic errors.

Change-Id: I8bedca041ebf9bbc0580b89076203e47942cc539
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-18 08:04:45 +00:00
Eike Ziller
487e4a2e51 unittest: Add missing tests (QmlDesigner, ClangTools and a few others)
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>
2021-06-17 14:44:20 +00:00
Thomas Hartmann
03985dd55e QmlDesigner: Use QtQuick 2.1 imports
QtQuick 1.1 is not supported anymore.

Change-Id: Ibfeba6f2e0617892ea823d1043344502e4617b7a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-17 14:34:57 +00:00
Thomas Hartmann
4642dc3518 QmlDesigner: Trim strings in tests when comparing
We use a NonIndenting rewriter and do not test the indentation.
Therefore we can trim white spaces.

Change-Id: I16e4acbbbc69568549cb679d988ff951b68f33b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-17 14:32:53 +00:00
Thomas Hartmann
6dba941b3f QmlDesigner: Use QtQuick 2.15 instead of QtQuick 2.1
QtQuick 2.15 is supposed to work and we can use it in some tests.

Change-Id: Ic3f6505dd5c683ec6521015b5dcd6c8f83a1171e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-17 14:28:37 +00:00
Thomas Hartmann
add272dbbb QmlDesigner.Tests: Use simplifiedTypeName for QtObject and Component
It is ambiguous if QtObject and Component come from QtQml or QtQuick.

Change-Id: I2e1dd48d80ee7aec8293eac85160d62a584c2819
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-17 14:28:29 +00:00
Cristian Adam
4bfcea22bf CMake: Allow standalone build of unittests
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>
2021-06-17 09:39:58 +00:00
Eike Ziller
d23cf2cced unittest: Fix build on macOS
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>
2021-06-15 10:50:13 +00:00
Eike Ziller
baa83725f6 Remove ClangRefactoring and ClangPchManager
This removes the plugins and tools, and removes all the tests that would
fail to build because of that.

Fixes: QTCREATORBUG-25659
Change-Id: I8adb5d503fc8eea313bcaada421f309dbbfa8c26
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-06-15 10:07:57 +00:00
Marco Bubke
3112d063e8 QmlDesigner: Update alias property declarations
Alias property declaration removal is now done before the normal
property declarations are synchronized.

Task-number: QDS-4525
Change-Id: Icddf5e041b672e4abfab89540906bbfdcc1a10ba
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-14 12:08:38 +00:00
Marco Bubke
b32f607bc7 Sqlite: Add condition to index
Change-Id: I83851b2f9cd516f21bc7e8987c1b60efaa019bb1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-14 12:08:31 +00:00
Marco Bubke
66ba9c4843 QmlDesigner: Synchronize alias properties
Alias property declarations are handled like normal property declarations
except that the have an value for the target property declaration id.
So they are distinguishable by the alias id. If it is not set it is a
normal property declaration. If it is set it is alias property
declaration. Alias property declaration are always synchronized after
all normal property declaration are synchronized. This synchronization
is not checking if the target property declaration changed. This update
has to be executed by the target property declaration.

Task-number: QDS-4524
Change-Id: I483840c821e12c93f1be67bf5ed6da396f8b45a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-14 12:08:24 +00:00
Marco Bubke
90cc7fed3b QmlDesigner: Handle implicit and explicit type names
Types are now handled by their import. Impicitly by an import list or
explicit for exported type.

Task-number: QDS-4496
Change-Id: I63f40df32760389e25b73597b4363f95ee304592
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-14 12:02:44 +00:00
Marco Bubke
4a04e75a4d UnitTests: Remove indexer printer
Remove the print functions for the indexer, clangrefactoring and
all dependencies.

Task-number: QTCREATORBUG-25668
Change-Id: I15c21322cf6f6c235d4757e32180e3d8812828a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-14 11:19:19 +00:00
Alessandro Portale
9915418f90 Tests: Turn manual widget tests into tests
...they do not need to be "executables" anymore

Change-Id: Ided0fa85ae891df66add47e59a9d7245f880213c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-11 14:39:52 +00:00