Commit Graph

8097 Commits

Author SHA1 Message Date
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
Marco Bubke
d593a5ea9b QmlDesigner: Add midSize image to cache
There is now a mid size image in the image cache. It's logical size is
150x150, so it is 300x300 for HighDPI.

Task-number: QDS-8918
Change-Id: I6586b2e82b9e74737f46b67c441201ad4964fca0
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-01-26 17:27:32 +00:00
Eike Ziller
e9b177db7d Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/libs/utils/filepath.cpp

Change-Id: I04761cf7c99ed67322a592cbd0ae48c1ae9c708a
2023-01-25 14:11:01 +01:00
Tim Jenssen
c1380bee4c QmlDesigner: refactor get qmlpuppet path
Change-Id: If1e61bb24acf97215bb11987b0d68ed28ffacaff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-01-25 11:44:24 +00:00
Marco Bubke
c719825927 QmlDesigner: Don't abort if any image is not null
So far we expected that both images are null or not null. But sometimes
you only want to save one image type in the collector. This will try to
generate the image cache entry again if you try to get a null image so
be careful.

Task-number: QDS-8917
Change-Id: I765f5b82589f52e439513a11926314ad2d99a928
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-25 09:56:36 +00:00
Jarek Kobus
01828cfd8e tst_qtcprocess: Add testPipe
Change-Id: I5b54231d201960eb6909780e4a2c5b9860b7e523
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-25 09:34:34 +00:00
Eike Ziller
06c4df37b9 CMake build: Remove usages of Qt5_VERSION
and remove checks for Qt < 6.2, since that is our minimum version.
Except for sdktool and qml2puppet.

Change-Id: Id36cd1a15a5a6e5480e4ae5d0a8ffaea4b2a1864
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-24 15:35:46 +00:00
Jarek Kobus
567216bb49 TaskTree: Fix continuation of group with parallel limit
Change-Id: I10c40d06c21a0446187b8227b526ee903c569307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-24 13:15:54 +00:00
Robert Löhning
1c25a48393 Squish: Update getQtCreatorVersionFromFile()
Change-Id: I9ca74e66c71b363604c6ea1467b2d1ccdffb45f5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-24 10:24:14 +00:00
Robert Löhning
270c0ffa3a Squish: Use consistent permissions
Change-Id: Id2849d4aaa2da181df0e674a971abd89c3083662
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-23 11:41:28 +00:00
Jarek Kobus
817553f3e5 TaskTree: Merge DynamicSetup with OnGroupSetup
Don't define 2 separate group setup items. Make OnGroupSetup
be able to handle also dynamic setup - like it's done with
CustomTask's setup handler.

Change-Id: I43e135f268ea96419b44ef5a4325707a124b4921
Reviewed-by: hjk <hjk@qt.io>
2023-01-23 08:07:36 +00:00