Commit Graph

6521 Commits

Author SHA1 Message Date
Marco Bubke
1b16eb209c QmlDesigner: Add QmlDocumentParser and QmlTypesParser
Task-number: QDS-5174
Task-number: QDS-5228
Change-Id: I0889e8d63b0260aeb0efae1b3c8a373c18ea1f03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:40:49 +00:00
Assam Boudjelthia
78da7e2922 Move sdkmanager's sdk level parsing to AndroidConfig
Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.

Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 14:56:06 +00:00
hjk
ba7aa5ea9c Docker: Also add Qt Quick stuff to test image
Had to tweak things a bit, and the QML part doesn't start up yet:

Starting docker://e5813ba3db76/data/dev/sessions/docker-quick-cmake/docker-quick-cmake...
QML debugging is enabled. Only use this in a safe environment.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-'
QQmlApplicationEngine failed to load component
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed

Change-Id: If7ec4aebee27880e01af6184ae22509e97054137
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:47:26 +00:00
Christian Kandeler
a40b7867f6 ClangCodeModel: Optimize getAstPath()
Profiling has shown that this function is a hotspot. Luckily, it can be
easily sped up by taking advantage of the fact that the AST nodes are
(mostly) sorted by range, allowing us to employ a binary search when
looking for a given range.

Change-Id: I950c150543ff68b975d36c6fb652d366b93ea3b2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-11 08:46:52 +00:00
Eike Ziller
7bb21fcfff Merge remote-tracking branch 'origin/5.0' into 6.0
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I87b19a51b1950d19eff95086848b0728ba2f0ebd
2021-10-08 15:58:02 +02:00
Robert Löhning
cbc9f4c4e1 Squish: Stabilize tst_rename_file
It takes a moment until the changed file appears in the project tree. A
context menu opened in that time may be in an unexpected state, so wait
until the renaming finished properly.

Change-Id: I6e1941083737b2df5855b9b0e61a973c99831304
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-07 08:56:06 +00:00
Robert Löhning
47cb2e9d24 Squish: Update and stabilize tst_rename_file
Change-Id: I1dae24e20d8c65b716dd988812eee013f0491603
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-07 08:55:50 +00:00
Robert Löhning
1cc4cbb402 Debugger: Tests: Fix warnings
To not confuse testers.

Change-Id: I2190e85cea5b0e32af883d8caa368aef0f55befc
Reviewed-by: hjk <hjk@qt.io>
2021-10-07 08:11:32 +00:00
Tim Jenssen
6860e361a4 qmldom: fix output path
Change-Id: I137accdb788fa4686a0c70dfcc1b66a6c576dcff
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-06 08:15:19 +00:00
Eike Ziller
19abb9f877 Merge remote-tracking branch 'origin/6.0'
Change-Id: I9d25a7ac39b3619856fc8d8a6be6f91a403b3969
2021-09-30 09:03:12 +02:00
Christiaan Janssen
525039daeb QmlProject: port changes from QtForMcus
Task-number: QTCREATORBUG-26041
Change-Id: I5068381fb2c4c901d8621e0b8358db77d2cb0b21
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-30 06:19:46 +00:00
Eike Ziller
050af56000 Merge remote-tracking branch 'origin/6.0'
Change-Id: If773f217a9708ce0ad0b8adeefe3266ba0371a32
2021-09-29 12:54:38 +02:00
Eike Ziller
aa22e98b1d Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: Iaa5a0fea546d4f28dbceae0458a325077ed382b7
2021-09-29 10:18:48 +02:00
Christian Stenger
430c48ac1a Tests: Fixup test expectations
Amends b64863806f.

Change-Id: I8df23cc10d71760cacb03eb59b728400a4ef3c61
Reviewed-by: hjk <hjk@qt.io>
2021-09-28 13:18:09 +00:00
Tim Jenssen
3ed8d60756 QmlDesigner: Integrate QmlDom
Task-number: QDS-5172
Change-Id: Ib17c38ef7b89b05daababaad1f8e2dc39d53a2bf
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-09-28 11:32:34 +00:00
Jarek Kobus
7958de05f5 Introduce Utils::Singleton
Introduce Utils::Singleton class and
Utils::SingletonWithOptionalDependencies class template
that helps implementing singletons that depend on other
singletons. It's guaranteed that whenever singleton B depends
on singleton A, than A is always created before B is being
created, and that the order of destruction is always
opposite to the order of creation.

Dependencies of singleton are listed as template arguments
for SingletonWithOptionalDependencies class template.
The first argument of SingletonWithOptionalDependencies
class template is always a singleton class itself.

Prepare a common interface for all singleton subclasses:
SingletonSubClass *SingletonWithOptionalDependencies::instance();

Make instantiating singletons and its dependencies thread-safe.

Create singletons on demand (only if some code needs them).
It's not needed anymore to explicitly instantiate
all required singletons in tests.

Make it possible (and thread-safe) to instantiate ProcessReaper
and LauncherInterface singletons in non-main threads.

Make the following dependencies between existing singletons:
   SshConnectionManager depends on:
-> LauncherInterface depends on:
-> ProcessReaper

Change-Id: Iefaacab561c2b3dcf07e7fafbb87339ea6a15278
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 10:25:29 +00:00
hjk
aa4b825809 Ssh: Use FilePath for SshConnectionParameters::privateKeyFile
Change-Id: Ifaf97cc744f80e1fa0f4000aabf83671b2ffd972
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-28 09:57:41 +00:00
hjk
0aa3cc45b5 Core: Use FilePath for ExternalTool working directory
Change-Id: Ifd295c3bd07b79f146b84fc27c117f42ba9b793f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-27 14:21:40 +00:00
Marco Bubke
9e29b602d4 QmlDesigner: Use ModuleId for Type instead of Module
We already know the module id because it's the source id of the module.

Change-Id: Ice241d38c12c7ca79a525464c53b7d552095a0fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:25 +00:00
Marco Bubke
03687c1d02 QmlDesigner: Add minimal updates
Exported type names are synchronized so that old type names are removed.

Task-number: QDS-5130
Task-number: QDS-5126
Change-Id: I6e6482170c8197f37f60a57bdfb7f1b450001b4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:21 +00:00
Marco Bubke
b2a300dd60 QmlDesigner: Refactor ProjectStorageUpdater tests
Change-Id: I0174153a470ce3009945df9cd2a822150f2f19f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-27 13:00:18 +00:00
David Schulz
c00330f905 Editor: multi cursor support
Adding a way to create multiple cursors that can insert/remove text at
arbitrary positions in the document. Adding cursors is done by pressing
alt + up/down or by clicking into the editor while holding the alt key.

Fixes: QTCREATORBUG-16013
Change-Id: I495d27d95a3d277220946616ef30efc241da0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-27 10:56:54 +00:00
Christian Stenger
b64863806f Tests: Fix expectations in offset test
Change-Id: I875966409d769fe19e615763c605c527398b01dd
Reviewed-by: hjk <hjk@qt.io>
2021-09-27 10:40:15 +00:00
Orgad Shaneh
f2f1fc8601 Use lowercase for Windows header for supporting cross-compilation
Linux mingw uses lowercase headers, so cross-building on Linux for Windows
target must use the correct form. Windows is case-insensitive, so it won't
affect host-native builds.

Change-Id: Ic2140412bb367bbce83b5e2546d70e0936928c5c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-09-27 07:23:22 +00:00
Marco Bubke
091f157192 QmlDesigner: Adapt project storage changes in updater
Task-number: QDS-5123
Task-number: QDS-4923
Task-number: QDS-4925
Change-Id: I79acbbdb11bf7a0529c1ef005e6b5e1fd0d12aa7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-22 11:22:11 +00:00
Christian Stenger
de3e3e7af1 Tests: Fix execution of dumper tests on Win
Amends 6786d585e0.

Change-Id: Ib0c9b3d07741db00a01033be2118487ecc9644ea
Reviewed-by: hjk <hjk@qt.io>
2021-09-22 04:41:33 +00:00
Marco Bubke
6587feb3d8 Utils: Improve string conversion for Qt6
Skip the creation auf a QByteArray. Use QStringEncoder instead.

Change-Id: I3d2297b1fef27acb2136a64587c5af9099d92aa6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-09-21 12:45:51 +00:00
Christian Kandeler
e79b9050eb CppEditor: Remove an unused enum value
Change-Id: Ifd0361a9a78eae7be917e1fff68161aa0cd8e79f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 11:28:19 +00:00
The Qt Project
9815d2ee7e Merge "Merge remote-tracking branch 'origin/5.0'" 2021-09-20 11:51:42 +00:00
Eike Ziller
6a99368979 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/utils/processreaper.cpp
	src/plugins/android/androidbuildapkstep.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: I353a445b5862f63362ea954749b5565360951283
2021-09-20 13:43:20 +02:00
Marco Bubke
728be60986 QmlDesigner: Change import export architecture
The new architecture should be a better abstractions for qml.
ImportedTypeNames are introduced. ModuleDependencies are now taken
over by document imports. Modules lost their version and
ExportedTypeNames gained it.

Task-number: QDS-4938
Task-number: QDS-4933
Task-number: QDS-5009
Task-number: QDS-5032
Change-Id: Ia86921c5be9107fe7d5bfd28f12bf8453769dc10
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:22 +00:00
Marco Bubke
13aaea197b QmlDesigner: Rename Import into Module
Task-number: QDS-4933
Change-Id: Ibc28ae731ffb27734f61eb438230fa58fe800bdc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-20 07:29:15 +00:00
Marco Bubke
a570d53db2 QmlDesigner: Add ProjectStorageUpdater
Adding a skeleton for the ProjectStorageUpdater.

Task-number: QDS-4819
Task-number: QDS-4793
Change-Id: I230d68f71480d360d71019883510ef22dd276802
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-20 07:28:59 +00:00
Robert Löhning
f529051b58 Squish: Be fuzzy when comparing snippet fetched from Pastebin.Com
Change-Id: If08b2b9136d55e2dddca6181c1075d845422a30b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-16 07:17:55 +00:00
Robert Löhning
a1eb505fbd Squish: Use Qt 5.14 in tst_openqtcreator_qbs
Change-Id: If214c32a0a62ebdada455a325ad1b2d02adc67c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-16 07:17:37 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
Christian Stenger
6786d585e0 Tests: Fix running dumper tests on Win
Using QtcProcess needs more setup, so use consistently
QProcess for all processes inside the dumper tests.

Change-Id: I7c09c6705c8b8d52ba7b27b054b825c4147647d3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 11:18:48 +00:00
Jarek Kobus
4b81483b4d Add some explanation about how to run this test
Change-Id: I748e13db89dc79bbf11f663ce6914513d2912766
Reviewed-by: Alp Öz <aoz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-13 10:50:44 +00:00
Jarek Kobus
f72c4cb8ac Ssh: Re-base SshProcess on top of QtcProcess
Change-Id: I266820e0e2ea12d6e4a5a83a679a7279fab9cd83
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 09:26:09 +00:00
Cristian Adam
0f0287d907 Debugger: Enable standalone usage of debugger auto test
Change-Id: If89d261c82b25332ab6e354dfbf908765bb802f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-09-13 08:00:29 +00:00
Jarek Kobus
33f1a96005 Control the lifetime of SshProcessManager
Make it possible to control when the SshProcessManager is
being constructed / destructed. Expose public constructor.

Since different singletons depend on each other, we need
to control the order of creation and destruction of them.

The order of creation is like that:

1. QCoreApplication
2. ProcessReaper
3. ProcessLauncher
4. SshConnectionManager

The order of destruction must be opposite to the above.

Change-Id: Ice07eb751cd61c03cb461816fa1b74ab040a53de
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-10 14:02:21 +00:00
Jarek Kobus
ecfe6b7fc1 Add a test ensuring we don't receive a warning when killing process
Before we were receiving the following warning when detroying the
QtcProcess while still running:

QProcess: Destroyed while process ("[program_name]") is still running.

With the new implementation it won't appear anymore since terminating
running QtcProcesses is done internally by the reaper.

Change-Id: I14a0de136f463966cb1e4c43c5cb26b4de47e7ce
Reviewed-by: hjk <hjk@qt.io>
2021-09-09 14:34:59 +00:00
Ihor Dutchak
716efc964d Debugger: Add support boost::container vector/static_vector
Also fix boost::container::list.

Change-Id: Iaa2ff09defc6f90c3f6eb1f7b333f9e5ccc16b65
Reviewed-by: hjk <hjk@qt.io>
2021-09-09 07:18:34 +00:00
hjk
d10b8e47de Debugger: Fix CComplex dumper test
Looks like newer gdb's output looks now closer to lldb's.

Change-Id: I9b44eec1aa1c448ca4ed85696243807145a8de51
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-08 14:34:13 +00:00
hjk
adae66455d Docker: Use current cmake in test Dockerfile
Change-Id: Icf9c116a72e679223aaa9a3f545fb0f7db5a31d4
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
2021-09-08 14:26:37 +00:00
Assam Boudjelthia
41528390b8 Revert "Move sdkmanager's sdk level parsing to AndroidConfig"
This reverts commit 2d77922856.

Reason for revert: This causes a build error in Android tests, reverting until the a fix is ready for that to not block the repo.

Change-Id: I74961df660ebaf69caf092d53172821815f21268
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-08 12:52:16 +00:00
Assam Boudjelthia
2d77922856 Move sdkmanager's sdk level parsing to AndroidConfig
Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.

Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-08 08:09:20 +00:00
Eike Ziller
95de5c93b1 QmlJS: Fix issues with getting modulePaths
This patch

- improves performance by removing the usage of QRegularExpression for
trivial string operations (this is called 3000 times after configuring
Qt Creator)

- fixes handling of version number like "2.-1" which are the result of
imports with only a major version number like "import QtQuick 2"

Task-number: QTCREATORBUG-25899
Fixes: QTCREATORBUG-26178
Fixes: QTCREATORBUG-26216
Change-Id: Ic792909513f4fe25ac72043645f297ee41890375
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-07 08:16:48 +00:00
Jarek Kobus
ace765c199 Move ProcessReaper into lib/utils
Reuse ProcessReaper inside process launcher.
Automatically reap all internal QProcesses of QtcProcess
(either direct child of QtcProcess in QProcessImpl
or indirectly inside process launcher).
Make ProcessReaper work again on QProcess instead of on
QtcProcess, so it may still be reused for non-QtcProcesses.

Change-Id: I950cac5cec28f17ae97fe474d6a4e48c01d6aaa2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-09-06 21:28:19 +00:00
Jarek Kobus
8724a4efbb Use QtcProcess for clangbackend
Change-Id: Ifdcdba765409a09861f81dd3dff405115a986801
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-03 14:06:56 +00:00