Commit Graph

8032 Commits

Author SHA1 Message Date
Jarek Kobus
8eaf73700e TaskTree: Don't call storage done handlers from TaskTree's d'tor
Change-Id: Ie2b04d433be3452f9e668efd3341dedfcb154290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-24 12:48:44 +00:00
Marcus Tillmanns
d5a9e28a96 Utils: Add tst_filepath
Moves all tests that are applicable only to FilePath over from
tst_fileutils.

Change-Id: Ic331e1470a7479ee2f8ba38baec84124982a000a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-24 09:45:56 +00:00
Eike Ziller
c2266981c9 Add tests to Utils::wildcardToRegularExpression
It was unclear if the new non-filepath version that is added to Qt is
similar enough to replace our own version, so just add the new tests
from Qt to check.

Change-Id: I9ac2739500ab3b8557c0e6223489e0fdddd79091
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-23 13:33:37 +00:00
Christian Stenger
5c4cf2d018 SquishTests: More adaption to changed wizard template
Change-Id: Ib073a8eae3ee87dc46699083799a8316da66b32d
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:51:08 +00:00
Christian Stenger
0604027834 SquishTests: Fix path handling for pre-installed Qts
There is now a Qt6 and a new possible location.

Change-Id: I4feac6da2756bde77e98ce08f945ddefec7e2fb4
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:51:02 +00:00
Christian Stenger
3a7ab3ce8e SquishTests: Rename helper class
Change-Id: I39890cbd98b7e6ebcc0fdf4722d0311eb6650397
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:50:56 +00:00
Marcus Tillmanns
00fd4c8fea Utils: Fix diriterator for scheme folders
Previously the "fileName" of every device inside a scheme subfolder
would be empty. Therefore QDirIterator would skip them.

Change-Id: Ifa46859aadbd8a81364a1fe0a72b9a50a7a396ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-23 10:25:15 +00:00
Jarek Kobus
d44126c300 Unittest: Drop unneeded dependencies to coreplugin files
Amends baa83725f6

Change-Id: I82b472585dc30b0466eace15897f5d96fc7e9fd9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-23 09:35:38 +00:00
Marco Bubke
e675fecb9e UnitTests: Make test fore robust
Change-Id: I6e92f242f759a89a11c77d862b5158c86b2b7a5a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 09:05:54 +00:00
Marco Bubke
e78837a27a UnitTests: Disable warning for self assign overloaded
We want to test it so we cannot fix the code.

Change-Id: Ieb0517e539ae60c275069b790ca32380d39a59f0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-23 09:05:24 +00:00
Marco Bubke
20c366aa48 UnitTests: Disable self move warnings
We want to test self move, so we cannot avoid the warning.

Change-Id: Id785690d40cfc5299e65c9f0e69abe6e336ba9ff
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-23 09:04:55 +00:00
Eike Ziller
66d4e12a58 Build: Remove FindQt5.cmake
No longer needed, since we generally only support building with
Qt 6 nowadays, and the parts that still do support building with
Qt 5 handle that manually.

Change-Id: I72381589ca3ab7bf1af88d9f185cad7f0cdf149c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-02-23 07:12:44 +00:00
Eike Ziller
37ec527e6d Fix tilde expansion in FilePath::fromUserInput
It was not working for just "~/" without additional path component.

Change-Id: I559a7771fc09d2e604f567548585a668e8809729
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 07:12:15 +00:00
Christian Stenger
a759e400cc Debugger: disable inheritance dumper tests for LLDB
Change-Id: I6944d156cbef49838a6fcbae066d3a59f91325b7
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-23 06:00:27 +00:00
Marco Bubke
18157d0b24 Sqlite: Add pathExists function
The 'pathExists' function can be registered to the database connection
and is then callable in Sql.

Task-number: QDS-9217
Change-Id: I21afc5cd38765854daa0b1058cc5e8946b551924
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-22 10:48:05 +00:00
Marco Bubke
b4ab1e173b Sqlite: Add progress handler
Sqlite::ProgressHandler handler{
  [] { return Sqlite::Progress::Continue; },
  1000,
  database};

is setting up a progress handler for this scope. If the handler is
destructed it will automatically reset the handler on the database. The
handler is active for the whole database connection.

Task-number: QDS-9216
Change-Id: I59831f40d32c062eefdfb0c4dfbf3045058e1fd2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-22 10:47:55 +00:00
Eike Ziller
ddbf8a4ffb Merge remote-tracking branch 'origin/10.0'
Change-Id: I8a53e2e8216fab7e45c3a1b8a3d2dc6656dfa7e2
2023-02-22 11:28:08 +01:00
David Schulz
01d3ed0463 Debugger: fix optional and variant dumper test when using qt5 qmake
Change-Id: Ib9cf05384535eab9d0e39a49d96aa88af48548d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-22 04:58:58 +00:00
Vikas Pachdha
0e7a603568 UnitTests: Disable warnings as errors
Change-Id: Ib58799510258973638f25ec4d52ce62710c26f54
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2023-02-21 15:55:35 +00:00
David Schulz
b625e8bb9b Debugger: improve dumping Qt pointer types
Adding the data as pointers allow casting the data to the actual derived
class

Change-Id: Id1b421c2729c6da8bf17054e39b4f1e8d8ff2cfa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:59 +00:00
David Schulz
1a575cd2df Debugger: Fix printing of pointer to multiple inheritence base class
...for cdb when we have no nativeValue. This is the case whenever we
have a container like std::vector, QList or a c array to the base class.

Fixes: QTCREATORBUG-28337
Change-Id: I18c63dfbc207d76bf41d85d5da83f7f4603504f9
Reviewed-by: hjk <hjk@qt.io>
2023-02-21 08:45:49 +00:00
Christian Stenger
2d79718ad4 SquishTests: Adapt to changed wizard template
Change-Id: I7e487481ede88d186fb868d595eb96f25afc2fc5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:43 +00:00
Christian Stenger
4525d7baf9 SquishTests: Adapt to changed wizard template
Change-Id: Id50e16a790e63f7c99fbbe5213d9e25d20aaf29b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:27 +00:00
Christian Stenger
5c7eb717ed SquishTests: Adapt to changed wizard
Change-Id: I07d3b468e6b5ec4055fa57efcddaa0cdb678966b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:23:14 +00:00
Christian Stenger
507e5f76fa SquishTests: Fix expectation for profiling
Wizard template has changed and we use Qt6.2 nowadays.

Change-Id: I63d0103ac324bcf83f0b07802f57a171589a2fb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-21 06:22:51 +00:00
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