Commit Graph

6441 Commits

Author SHA1 Message Date
hjk
652b9844e6 Utils: FilePathify Environment::{ap,pre}pendOrSetPath etc
Change-Id: Idfa5ec247337570936b0236cab9d3a5669792ca0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-10 07:26:31 +00:00
Christian Stenger
f686bce68f QmlJS: Soften strict equality check Pt II
Disable strict equality check for undefined values as there
are too many ways the code model just assumes "undefined" as
the information would be present at runtime only or to avoid
too complex evaluation.

Task-number: QTCREATORBUG-25917
Change-Id: I7c6da04f52ba767c4ef5c21078dc14ac4de86687
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-08 08:04:42 +00:00
Jarek Kobus
acfe224281 Flush finished() signal when waitForReadyRead() was called
Apparently the QProcess behaves like that.

Change-Id: Idb1993b8abccbd7943582d41bd456eacc9a1c185
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-04 12:30:03 +00:00
Robert Löhning
91f4559720 Squish: Don't wait for nothing in tst_simple_debug
Change-Id: I74bb40b03fa13568571f4009618c523bf9c13c63
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-01 12:39:32 +00:00
Jarek Kobus
3562c5e96e Remove unneeded includes of QProcess from cpp files
QProcess wasn't used in these files.

Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-11-01 12:04:41 +00:00
Robert Löhning
5ba3eb7fcf Squish: Update for running tst_generic_highlighter
Change-Id: I262fb7a7223e235708cbc7e8e382a2448a2f8c84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 13:20:00 +00:00
hjk
84f6b8891b Core: ExternalTool: Use FilePath also for executables
Change-Id: I6ec914b68ae41f9ee5eb28416c29d0431c5ab880
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-29 11:54:29 +00:00
Robert Löhning
73405cc089 Squish: Update for running tst_APTW01
Change-Id: I95ac2d2209dbc47e316b746313e4545a1b80ab55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 11:23:37 +00:00
Christian Kandeler
c3a1193969 TextEditor: Add highlighting category for namespaces
... and make use of it in the built-in code model and with clangd.

Task-number: QTCREATORBUG-16580
Change-Id: I8c331f56aa1bbf91c9f768be82a779a72f40c4c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-29 08:36:20 +00:00
Christian Kandeler
d8d4739bc4 TextEditor: Allow special highlighting for static members
Task-number: QTCREATORBUG-9659
Change-Id: Idae529fd876ba5f555c76e4d282efc9263263d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-28 10:04:57 +00:00
Robert Löhning
c4ba0c2021 Squish: Update for running suite_CSUP
Change-Id: I2773f98af0a6656fcf1362b4dcd2d853cc2aea81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 18:47:04 +00:00
David Schulz
d849643cb0 QmlJS: fix building tests
amends d68bb4687c

Change-Id: I7fc5b260a7748829038b8494e75e4cfc5a56945b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 08:46:04 +00:00
Artem Sokolovskii
a013d75728 CppEditor: Change parsing opposite bracket
Fixed behavior:
- when comparing sign was determined as angle bracket
- when in complex combination brackets, an opposite bracket
was detected not correct
- not correct mismatch case highlightning
Added tests for the cases form bug 26395

Fixes: QTCREATORBUG-26400
Fixes: QTCREATORBUG-26395
Change-Id: Ic45566d2677f80fb9a8e4fe830307254dd1db51d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-25 14:07:44 +00:00
Assam Boudjelthia
43f759a6b0 Android: remove unauthorized field form AndroidDeviceInfo
This is not really needed anymore, it was mainly used for physical
devices to report whether they need user authorization to be used
via adb. This is now handled by IDevice::DeviceState, where a
Connected device is unauthorized, otherwise any physical device is
ReadyToUse if authorization is good.

Change-Id: If5c1e49b98063eabe4205cd8adb5b11515e1e1de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-25 09:22:08 +00:00
Assam Boudjelthia
ec55b1a483 Android: remove AndroidDeviceType and State from AndroidDeviceInfo
No need to have these enums which are now only a duplication of
IDevice::MachineType and IDevice::DeviceState.

Change-Id: Icc3f112f2670c7354bb282b36fad0f0631b9e047
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-25 09:21:37 +00:00
Jarek Kobus
0101808407 Refactor HighlightingResultReporter
In some unlikely circumstances it may happen that
HighlightingResultReporter might be destroyed before
returning from the HighlightingResultReporter::start()
function. This may lead to undefined behavior.

Refactor the HighlightingResultReporter so that instead
of using QRunnable subclass we define simple function
returning the QFuture object directly.

Change-Id: Ib833771a7e46e87c83d10b59ca056a0147fabe88
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-21 07:38:53 +00:00
Marco Bubke
428a9ee509 QmlDesigner: Use one synchronization struct
The arguments of the synchronization function are changing constantly, so
all tests have to adapted even for default arguments. To reduce this
changes now a struct is used as parameter.

Task-number: QDS-5196
Change-Id: Id3b6a530bcb8ab043eccce6526088f345d746235
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:42:47 +00:00
Marco Bubke
b4fcd05451 QmlDesigner: Introduce different modules for cpp, qml and directories
There are now different modules for qml, cpp and directory imports.
Cpp imports are qml import append by "-cppnative".

Task-number: QDS-5196
Change-Id: I599b224892c5ada0224a765d0bde8b32de20b061
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:41:55 +00:00
Marco Bubke
cb946ec307 QmlDesigner: Support multiple module ids per type
The type will be use source id and name instead of module id and name as
key.

Task-number: QDS-5236
Task-number: QDS-5238
Change-Id: Ibc9c298dc0a6363b630173ec4981d574cecd02ff
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:41:34 +00:00
Christian Stenger
e1a15b2db5 QmlJS: Soften strict equality check
Judging on the sense of a strict equality check depends on
different aspects. As attached properties cannot be inspected
easily and e.g. function calls cannot be evaluated as they may
have different return values for different code paths we need
to soften the check to avoid false positives.

Fixes: QTCREATORBUG-25917
Change-Id: I121335a387eb235090346162df4703d3000b7426
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-15 05:18:23 +00:00
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