Commit Graph

7307 Commits

Author SHA1 Message Date
Jarek Kobus
efc4a0f1af AsyncTask: Make it possible to run with promise
Using QtConcurrent API.
Adapt asynctask tests according to new API.
The old API in going to be removed, soon.

Change-Id: I3cf163e9492526f0b49bd162c27e6c55a98ace7a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-20 14:21:06 +00:00
Marco Bubke
ba6c1344b6 QmlDesigner: Integrate ProjectStoragePathWatcher
Task-number: QDS-9170
Change-Id: Iedbb07e41232beeb73cd12c89f892eec7968d084
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-02-20 14:12:43 +00:00
Marco Bubke
44d61b3e66 UnitTests: Fail on warnings
Task-number: QDS-9135
Change-Id: I798b1143c68e68bcd53144f5e6d01864ae0ce73b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-20 14:12:37 +00:00
Marco Bubke
9b43e0caea Googletests: Bump to 1.13
Change-Id: I8b54611e404e5313269fc3436ce995bf0d09d35d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-20 14:03:58 +00:00
Jarek Kobus
2d53e90a2b Utils::Link: Remove 3rd arg from fromString()
Not used anymore.

Change-Id: Iba758c0b5a6bb72c4b65511ab7e0e25e88cbf4f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-16 15:19:18 +00:00
Christian Stenger
bc38ad8c59 SquishTests: Adapt to changed project template
Change-Id: I9aa98f194a7ab4fa1390b106e398b12546a7addd
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-16 14:07:57 +00:00
Christian Stenger
7a26b76ce3 SquishTests: Tweak preparation of toolchains
Prepare toolchains for usage. Basically parameterize function
to be used with more than one version and make use of it.

Change-Id: I30ee198302de54d933fa7c436e701273d497cc07
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-16 14:07:51 +00:00
Christian Stenger
15ca3268ad SquishTests: Provide Qt6.2 for testing
Long overdue. Adapt Qt Quick related stuff as this nowadays
is requiring Qt6.2 as a minimum.

Change-Id: Id1e727813034044edb4584c6d5f73a56310293d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-16 14:07:44 +00:00
Marco Bubke
cbd02325a8 QmlDesigner: Add extension support in qmltypesparser
Task-number: QDS-7384
Change-Id: I3f84f361360bd085d0ee78f32d808151e32a2436
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-16 12:26:32 +00:00
Eike Ziller
4e9309f923 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/clangcodemodel/clangcodemodelplugin.cpp

Change-Id: Idb3d6e8fdfd278979f6180dc3795a2138bc2e61d
2023-02-16 12:47:32 +01:00
Marcus Tillmanns
cab8eee85c Utils: Fix fileInfoFlagsfromStatMode
Previously the checks for the mode bits were incorrectly
using AND checks. As a fix the contents of "stat.h" was
copied and converted so it can be used directly and on
platforms that do not contain stat.h

Change-Id: If735dcffb8ffc490d297dae7f8c43ae01e79f460
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-02-16 08:20:11 +00:00
David Schulz
2c39db8eb7 Debugger: modify dumper for std::variant
Directly display the containing value without the need to expand the
variant. Additionally fix the dumper for Windows and add tests.

Change-Id: Iaae49470750fa3659339331e1518e13020df7938
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-15 08:23:18 +00:00
David Schulz
3a2b49aafa Debugger: test std::optional dumpers
Change-Id: Iae177dd3448a861e93935d02388ea6af187bd9f3
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-15 08:23:13 +00:00
Eike Ziller
364013b9ac Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: Ib01e191652168b2c38e80678f2f804bb95143cc5
2023-02-14 16:05:31 +01:00
Orgad Shaneh
6a0a4ac5e4 Merge remote-tracking branch 'origin/10.0'
Change-Id: Iff4973fc4116122bcaa7aa9434294dba875ef56a
2023-02-14 15:52:41 +02:00
David Schulz
4838dead1a DumperTest: print total time in debugger
Change-Id: I1397bd3d8034cb334bdc3b84bdbcc060aa0cd9f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-14 09:47:52 +00:00
Robert Löhning
b7f235edb6 SquishTests: Avoid known bug with CMake-based Widgets projects
...and start testing it again as soon as the report is closed.

Task-number: QTCREATORBUG-28787
Change-Id: Ib33efb6ef2851726a183576bfde5db0a1a5d8c38
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-13 21:34:56 +00:00
Alessandro Portale
6138414813 Tests: Remove a couple of tr() calls
No need to have them translatable and to risk lupdating them.

Change-Id: I41c84240ed30ffb6e19ab133422f4e5fb3a97aa4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 16:27:08 +00:00
Jarek Kobus
06dda40ccc TaskTree: Add synchronous invocation (Tasking::Sync)
Make it possible to mix synchronous and asynchronous calls
inside task tree.

Basically, it's a shortcut for:

bool syncMethod();
Group {
    OnGroupSetup([syncMethod] { return syncMethod()
                                ? TaskAction::StopWithDone
                                : TaskAction::StopWithError; })
}

Please note: similarly to Group, Sync isn't counted as a task
inside taskCount() and doesn't emit TaskTree::progressValueChanged()
when finished. It's being considered as a simple handler
that doesn't last long and shouldn't block the GUI thread.
Otherwise, use AsyncTask instead.

Change-Id: If71c5da2f9b202a69c41a555cc93d314476952f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-10 10:50:47 +00:00
hjk
4b9aaf6ca1 ExtensionSystem: Remove the IPlugin back pointer to pluginspec
The price of having to loop in two places seems small compared
to cleaner relations between the classes.

There's a new hack in the helpmanager to make sure we aren't
looping to often. The hack wouldn't be needed if the (odd(?))
check there weren't there.

Change-Id: Ifed50213b2de8feedfb45c185808d163c00c19ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 10:23:33 +00:00
Eike Ziller
2f5aed6c78 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/clangcodemodel/clangdlocatorfilters.cpp

Change-Id: If91f26625ea9620fb9fdbf45705b32f37cb7f158
2023-02-10 10:43:06 +01:00
Eike Ziller
b29cb4efe1 Merge remote-tracking branch 'origin/9.0' into 10.0
Conflicts:
	src/plugins/texteditor/codestyleselectorwidget.cpp
	src/plugins/updateinfo/updateinfoplugin.cpp

Change-Id: Iac33b852ccef6018bd81188716526aa70c3f5a2d
2023-02-10 10:29:14 +01:00
Christian Stenger
ff65caf62f SquishTests: Explicitly convert QString to str
Change-Id: Idcd70a18ed5535d8ad76c09007558cb96f20d178
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-02-09 13:51:26 +00:00
Christian Kandeler
207f2b216c CPlusPlus: Add lexer support for new C++20 keywords
Change-Id: I2b83deb0502ebf2cdca2af774fbb2ce26e947c11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-09 13:19:53 +00:00
Christian Stenger
bad6b2c290 SquishTests: Avoid crash in test
Workaround crash inside a test that may happen if the
test tries to wait for an object when the AUT is gone already.
Check for a clean exit and only if this is not the case
try to continue with the error handling.

Change-Id: I65f3e72cd343ec527ad822de915bc0c49c263153
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-02-09 12:04:18 +00:00
Robert Loehning
15841807d5 SquishTests: Update createNewQtQuickApplication()
Change-Id: I4b5171b73e69d3b9d4b3acb1108df363220b6068
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-09 09:48:56 +00:00
Christian Kandeler
bd2ca236e1 CPlusPlus: Check maximum include depth in lexer
We use a value of 200, which is also GCC's default.

Fixes: QTCREATORBUG-28770
Change-Id: Id02b324cd2ffa81a709441a5d93856bcd06501c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-08 12:53:31 +00:00
Marco Bubke
ff3d4b44f1 QmlDesigner: Use Qt6_VERSION instead of Qt5_VERSION
Change-Id: I346f5d256468696076299f964022c0a2ec2d190d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-08 08:42:47 +00:00
Marco Bubke
d2bb27731d QmlDesigner: Add direct dependency on QmlDomPrivate
It adds an indirect dipendency to QmlCompilerPrivate too. We stick to Qt
6.5 because the private API changed.

Task-number: QDS-9049
Change-Id: Icb0b406fc47759763384e167c0cabbffc1c9e186
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-07 17:43:57 +00:00
Marco Bubke
befb49bbce QmlDesigner: Fix missing adaption
Change-Id: I307c9f236ee8ebd36d62b3fe9b0d4bbaea5699e8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-07 17:43:43 +00:00
Jarek Kobus
84ba73be8c RunExtenstions: Remove StackSizeInBytes
It's currently not used.

Change-Id: I223a2e8add92a107b85518bcaf44bbd8a5e3fb9a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-07 12:56:43 +00:00
Marcus Tillmanns
516fce6f53 Utils: Add FilePath::tmpDir and createTempFile
Change-Id: I6f3143e59a87edffeee5e08708ba721293a8a369
Reviewed-by: hjk <hjk@qt.io>
2023-02-07 09:28:38 +00:00
Eike Ziller
d278135497 Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: I8d73198561f6ff7877d580681ca2a0018b7dc3b1
2023-02-06 10:14:18 +01:00
Jarek Kobus
d829d9ff33 StringUtils: Add trimFront(), trimBack() and trim() methods
Change-Id: I900c30111c79bee548c4861b082d7b035a5dc43d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-02-05 17:17:00 +00:00
Christian Stenger
dd3f5d3a6a SquishTests: Fix designer test
Children inside the object inspector are sorted
lexicographically nowadays.

Change-Id: I2f704e3a3cca526246babb2b12d48fe359eb6e6b
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-02-03 14:26:25 +00:00
Jarek Kobus
2d8d27c9ba StringUtils: Add joinStrings method
See QTBUG-110900. In meantime, StringUtils addition.

Change-Id: I700321a65d2d00b85daa412c77b573457312ad3c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-02-03 11:33:27 +00:00
Cristian Adam
51cbfd77db CMakePM: Improve CMake presets kit config hashing
Amends a3153c535d

QT_QMAKE_EXECUTABLE was not taken into consideration and this would
result in not matching kits.

Also Visual Studio generator will not have a CMAKE_C|XX_COMPILER values
in the cache.

On Windows there could be paths with "C:" vs "c:" and the hashes again
wouldn't match.

Change-Id: I5da5fafbd29f3d1fd8c9615c41b7659e63c30ff1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-02-02 15:56:46 +00:00
Robert Loehning
1d6d01952b SquishTests: Fix tst_cmake_speedcrunch
Change-Id: I76b199a7e1f2e92b78b42ee08342a95bdf385950
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-02 08:35:17 +00:00
Christian Stenger
476f67cce5 SquishTests: Fix default settings test
Depending on the presence of the llvm that had been used when building
QC we need to expect its clang.
Use special environment variable to be able to do this correctly.

Change-Id: I2497bbd96483f37aa90842d7fffa5d0a8103ff45
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-02-01 14:42:05 +00:00
Jarek Kobus
45d72db1b4 TaskTree: Add 2 more variants of NestedParallelError test
Variant 2:
Inside this test the process 2 should finish first, then synchonously:
- process 3 should exit setup with error
- process 1 should be stopped as a consequence of error inside the group
- processes 4 and 5 should be skipped

Variant 3:
This test ensures process 1 doesn't invoke its done handler,
being ready while sleeping in process 2 done handler.
Inside this test the process 2 should finish first, then synchonously:
- process 3 should exit setup with error
- process 1 should be stopped as a consequence of error inside the group
- process 4 should be skipped
- the first child group of root should finish with error
- process 5 should be started (because of root's continueOnError policy)

Change-Id: Ie34737244c7da4334a6cbbae4f0ddba99503d09c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-01 13:10:06 +00:00
Jarek Kobus
f8d4e485c2 TaskTree: Add a test for running empty tree with group handlers
Change-Id: Ia8c31928f07bec7a91937e0a1798d99ac761d0e2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-01 13:10:00 +00:00
Robert Löhning
54326a127e SquishTests: Use openDocument()'s return for verifying project tree
It's used anyway, relies on the expected project
tree and works around a problem on some machines.

Change-Id: Ic1e3e7a3f492f37d70c4409699ca78ad548d7445
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-01 12:41:47 +00:00
David Schulz
0dab651ccd Merge remote-tracking branch 'origin/9.0' into 10.0
Change-Id: I7e171601cd7317b48d5074bbc0ead127813d596c
2023-02-01 08:16:30 +01:00
David Schulz
739d4942e2 Merge remote-tracking branch 'origin/master' into 10.0
Change-Id: I9f6090e2a9f62fd3a9823f5a7342ea423dfbb2ac
2023-02-01 05:24:33 +00:00
David Schulz
4e8b7eee9d Cpp: support space ship operator in lexer
Fixes: QTCREATORBUG-27503
Change-Id: Idbff5a9b5b2e6e841e298ca6f706ef3c6aa1622b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-30 05:47:41 +00:00
Eike Ziller
3724520499 Merge remote-tracking branch 'origin/master' into 10.0
Change-Id: I4dd2149e046d33b65e6d9c3497d0153f81fd3f31
2023-01-27 15:41:54 +01:00
Jarek Kobus
0f19fd6d0d TaskTree: Add tests for proper continuation unwinding
Change-Id: I79a077277328033b99fab6b2503621f3209c63be
Reviewed-by: hjk <hjk@qt.io>
2023-01-27 14:15:25 +00:00
Jarek Kobus
6b11e1d572 TaskTree: Revamp tests
Get rid of std::bind.

Enclose each data tag of processTree inside its own block,
so that "root" and "log" names are unique within each block.
This makes each block look like a pattern with filled data up.

Introduce TestData structure, so that it's harder now to mix
the order of test data in new rows.

Introduce some enums instead of bools to make more meaning
on the returned data.

Change-Id: Iffe49cf1c7f912378467ab9f9c1256003dba7b9c
Reviewed-by: hjk <hjk@qt.io>
2023-01-27 14:15:14 +00:00
hjk
55dd933066 Haskell: Import from superrepo
Change-Id: I83c6c817c78ccbf1aee65847777f2652e19275a5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-27 13:30:26 +00:00
Christian Stenger
c22b4b35e1 SquishTests: Redo open document from navigation view
For unknown reasons this does no more work on a couple of machines.
Re-doing the original approach by explicitly expanding the tree as
necessary up to the file we want to open.

Change-Id: I329e18f3e2162e381e11fb6164a448ae67def606
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-27 11:33:12 +00:00