Commit Graph

6441 Commits

Author SHA1 Message Date
Christian Kandeler
da588b7cc4 CompilationDatabaseProjectManager: Move tests to plugin
Change-Id: Ife4ee68cdbd1560830f294610f8fab40653a4f5b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-22 07:45:19 +00:00
Christian Kandeler
1e912f7318 Unittest: Remove unused MockCppModelManager
Amends baa83725f6.

Change-Id: Iaee3b79d8aabcac5dee238692d66472881263764
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-22 07:30:44 +00:00
Christian Kandeler
a3d621fbde CppTools: Move ProjectFileCategorizer tests to plugin
Change-Id: I51d66d9ff9a14e2dd04cf25448ccc8c85bcbce97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-22 07:29:46 +00:00
Christian Kandeler
0adb502457 Unit test: Remove some now-unused CppTools sources
Change-Id: I61a0d15ade5093c6e7eeb005efed5704764fe7a1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 12:38:28 +00:00
Christian Kandeler
18ab828b6b CppTools: Move HeaderPathsFilter tests to plugin
Change-Id: Iecbb0942bed51002e85b96f6cc2ab034622cd07f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-20 09:35:52 +00:00
Christian Kandeler
5ec52eef31 CppTools: Move ProjectInfoGenerator tests into the plugin
Change-Id: I40d4b0b9751e77a5bb605349c86b37ad3935ca59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 12:09:48 +00:00
Eike Ziller
13e8a9a136 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I5dd6bd7d7e71c84a43b33c0aded673f3c4a57ef8
2021-07-16 12:48:19 +02:00
Thomas Hartmann
ec8f0ff703 QmlDesigner: Fix testRewriterComponentId
Only attach a single rewriter view.

Change-Id: I5ee4e12c8939e6738803a1d50026ea8b143e9d3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-16 08:45:44 +00:00
hjk
b841d79e28 Merge remote-tracking branch 'origin/5.0'
Change-Id: I8ecb4ab5cb5754e26de3c446abed2386c42305d6
2021-07-16 09:56:01 +02:00
Wojciech Smigaj
9d3100ff1e ProjectTree: Merge descendants of hidden Sources and Headers virtual folders
Unchecking the recently added "Show Source and Header Groups" option removes
the Sources and Headers virtual folders from the Projects tree. This patch
additionally merges descendants of these folders with identical priorities,
display names and file paths.

For example, if a project contains a folder including both source and header
files, both the Sources and Headers virtual folders will have child nodes
representing that folder. Previously, unchecking "Show Source and Header
Groups" kept both these identically named nodes in the Projects tree (one
containing sources, the other headers). With this patch, these nodes are
merged into a single node containing both sources and headers.

Change-Id: I4786eee4a528ea141a7fe117e14a050f68411890
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-15 19:45:03 +00:00
Alessandro Portale
f29d7b896f Restore support for CMake < 3.11
Prior to CMake 3.11, the SOURCES could not be omitted when
calling add_executable.

This change ensures that SOURCES are passed, at least when
building against Qt < 6.2.

Change-Id: I83bd82fe12364523ce6954d145b632df7210d118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-15 19:29:14 +00:00
Thomas Hartmann
361e0f0eb4 QmlDesigner: Fix testRewriterView and add testRewriterView2
The new test testRewriterView2 is a variant with slightly different setup.
We have to wait for the type information to be parsed.

Change-Id: I231b8d13e6be5ad52a8c3b72ebaf81c13a24f782
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 07:53:12 +00:00
Eike Ziller
92b5afc3de Merge remote-tracking branch 'origin/5.0'
Change-Id: If0cbc808d2c466aee81a77b3c078bac7a3d1e4cb
2021-07-15 09:48:08 +02:00
Marco Bubke
a30775a19e QmlDesigner: Prevent prototype chains cycles
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>
2021-07-15 07:05:00 +00:00
Christian Stenger
75aa1f2a6c Tests: Expect fail
Amends ada39349a2.

Change-Id: I4221590941ba17e28fff1d12bb0c80d92ecac911
Reviewed-by: hjk <hjk@qt.io>
2021-07-15 04:59:38 +00:00
Christian Stenger
4d8d91647e Tests: Fix nullptr access in QmlDesigner tests
This is just a hot fix and will be replaced later on.

Change-Id: I63fb5dcadc965ca2e9ade67b0b748f7abb011aff
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-07-14 11:20:55 +00:00
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
Thomas Hartmann
afe95c4ac2 QmlDesigner: Switch to QtQuick import
The Qt import is a leftover from Qt 4.

Change-Id: Ib7781be40774632bbe3fa869f174301bf3e28143
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-14 10:18:29 +00: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