Commit Graph

3403 Commits

Author SHA1 Message Date
Jarek Kobus
5c8b87bf9d TaskTree: Simplify some test code
Change-Id: Id81969d00a6e183e0d7cdcfddc64fc65aab6e020
Reviewed-by: hjk <hjk@qt.io>
2024-02-21 06:48:18 +00:00
Christian Kandeler
e930b29d66 CppEditor: Do not access document manager when gathering local symbols
As it turns out, that code runs in a dedicated thread.

Task-number: QTCREATORBUG-30401
Change-Id: I66236fa00b8ddb55276d822357517fdccb0e61df
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-20 16:04:22 +00:00
Jarek Kobus
62a203c926 TaskTree: Add tests for withLog() function
This addresses the 7th and 8th points in the bugreport below.

Task-number: QTCREATORBUG-28741
Change-Id: I5fe09227c1118e66c38bbe98ef720b21823c28ed
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-20 12:24:56 +00:00
Christian Stenger
7261c2889c Tests: Fix missing include
Avoids a compile issue before being able to execute the test.

Change-Id: Ibc76c16229107e2c23757de682bc78bfe4b7d6e7
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-02-20 10:40:28 +00:00
Michael Weghorn
84f4fb0818 Debugger: Fix building custom allocator dumper tests for MSVC
3b5c377ce5 had fixed them
for GCC >= 13, but unfortunately made them no longer
compile on Windows with MSVC as reported in the Gerrit
change, error below.

Align the implementation of the custom allocator
more with the "23_containers/vector/52591.cc" [1] ones
referred to in the GCC commit [2], in particular
define ctors, so this compiles with both GCC on Linux
and MSVC on Windows.

Move the definition of that custom allocator
to a new macro "MY_ALLOCATOR" to avoid duplication.

Previous error with MSVC:

    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): error C2440: 'static_cast': cannot convert from 'myallocator<char>' to 'myallocator<_Tp1>'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: 'myallocator<_Tp1>::myallocator': no overloaded function could convert all the argument types
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Users\davschul\Downloads\Archive\main.cpp(8): note: could be 'myallocator<_Tp1>::myallocator(myallocator<_Tp1> &&)'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: 'myallocator<_Tp1>::myallocator(myallocator<_Tp1> &&)': cannot convert argument 1 from 'myallocator<char>' to 'myallocator<_Tp1> &&'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: Reason: cannot convert from 'myallocator<char>' to 'myallocator<_Tp1>'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    C:\Users\davschul\Downloads\Archive\main.cpp(8): note: or       'myallocator<_Tp1>::myallocator(const myallocator<_Tp1> &)'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: 'myallocator<_Tp1>::myallocator(const myallocator<_Tp1> &)': cannot convert argument 1 from 'myallocator<char>' to 'const myallocator<_Tp1> &'
            with
            [
                _Tp1=std::_Container_proxy
            ]
    C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33130\include\xstring(3141): note: Reason: cannot convert from 'myallocator<char>' to 'const myallocator<_Tp1>'
            with
            [
                _Tp1=std::_Container_proxy
            ]

[1] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libstdc%2B%2B-v3/testsuite/23_containers/vector/52591.cc;h=ea80bb277c1f49190ae21b64e738428066eba1e0;hb=64c986b49558a7
[2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=64c986b49558a7

Change-Id: I13a3ed226a411479ea1d24a2eda490c8f293bf8f
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-19 23:03:58 +00:00
Eike Ziller
8826a8b47b Merge remote-tracking branch 'origin/13.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs

Change-Id: I2a3d92a14e4dd16897d19f7d8a8c7b0ec30d14a5
2024-02-19 14:44:54 +01:00
Jarek Kobus
36241b4462 TaskTree: Add global nullItem
This might be useful when using conditional operator.
Might also be used in place of the default c'tor for GroupItem.

Add a test for it.

Change-Id: I622e5d3d94f7020dc294cf5bca643c53a0813d8a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-16 06:21:53 +00:00
Eike Ziller
10a97be988 Merge remote-tracking branch 'origin/13.0'
Change-Id: I923d0054e306528825e1b36f9f24c378b151d85a
2024-02-15 11:30:32 +01:00
Jarek Kobus
0b3b5b892c TaskTree: Add a test for progress reporting with onGroupSetup(false)
Also for the case when parent iteration isn't progressive.

Change-Id: I831b86de68d504a1e5e189d2be2b12ffc7d97c60
Reviewed-by: hjk <hjk@qt.io>
2024-02-15 10:09:19 +00:00
Jarek Kobus
02ac5deb4a TaskTree: Fix progress reporting with nested LoopUntil(false)
Fix also a case when parent iteration isn't progressive.
Add a test for it.

Amends e059b62421

Change-Id: Ic2f8c047d413ab2e2b98af4592f7cb60185bea06
Reviewed-by: hjk <hjk@qt.io>
2024-02-15 10:08:49 +00:00
The Qt Project
10e2ff5362 Merge "Merge remote-tracking branch 'origin/13.0'" 2024-02-15 07:00:47 +00:00
Jarek Kobus
e059b62421 TaskTree: Fix progress reporting with LoopUntil(false)
Advance the progress value by the group's children count when
LoopUntil handler returns false on the first iteration.

Add a test for it.

Change-Id: I3783dd295dfaa16c09c5eda299f365ff981b3be7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2024-02-15 06:42:07 +00:00
Marcus Tillmanns
b39b192518 ExtensionSystem: Refactor PluginSpec
Splits the functionality between plugin type specific and general.

Allows Plugins to be loaded after the first pass, e.g. for Lua scripted
plugins.

Change-Id: If2712817a672c49d554fdc308250cb06ca7eb3f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-02-14 14:33:16 +00:00
hjk
0a1783d656 Utils: Rename NameValueItem to EnvironmentItem (1/2)
Only used in Environments nowadays.

Change-Id: I64a645ebebd5cb57c50d5d8f72a5e4dba40e122f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-14 11:33:53 +00:00
Michael Weghorn
4aaf7f2689 Debugger: Add debugging helper for std::tuple
Add debugging helper for std::tuple and add
a corresponding dumper test for it.

With this in place, the std::tuple variable and its elements
in the "tuple.cpp" sample program from QTCREATORBUG-25865 are
shown as expected on both, Linux (libstdc++) with GDB or LLDB and with
an MSVC build with CDB on Windows.

A debugging helper for libc++ had already been added in commit
34ff9c97e6.

Task-number: QTCREATORBUG-25865
Change-Id: I24b3d36b5daa26fd4fcb073c4df79015dfe752fc
Reviewed-by: hjk <hjk@qt.io>
2024-02-12 11:55:18 +00:00
Michael Weghorn
3b5c377ce5 Debugger: Fix custom allocator dumper tests for GCC >= 13
GCC commit [1]

    commit 64c986b49558a7c356b85bda85195216936c29a3
    Author: Jonathan Wakely <jwakely@redhat.com>
    Date:   Wed Dec 14 15:21:32 2022 +0000

        libstdc++: Diagnose broken allocator rebind members

added a static_assert that caused the dumper tests using custom
allocators to fail like this on Debian testing:

    DEBUG : tst_Dumpers::dumper(StdBasicString) qtc.debugger.dumpers: In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
                     from /usr/include/c++/13/bits/basic_string.h:39,
                     from /usr/include/c++/13/string:54,
                     from main.cpp:28:
    /usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<myallocator<char>, char, void>’:
    /usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = myallocator<char>; _Up = char]’
    /usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = char; _Alloc = myallocator<char>]’
    /usr/include/c++/13/ext/alloc_traits.h:126:65:   required from ‘struct __gnu_cxx::__alloc_traits<myallocator<char>, char>::rebind<char>’
    /usr/include/c++/13/bits/basic_string.h:90:24:   required from ‘class std::__cxx11::basic_string<char, std::char_traits<char>, myallocator<char> >’
    main.cpp:56:71:   required from here
    /usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
       70 |                         _Tp>::value,
          |                               ^~~~~
    /usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
    make: *** [Makefile:506: main.o] Error 1

Override the rebind behavior of the custom allocator used
in the tests to fix this.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=64c986b49558a7

Change-Id: I1cd8370e5f1601b710e28c251061291c65ac44ce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-09 19:50:26 +00:00
Marcus Tillmanns
a020c13e10 Filepath: Fix operator<()
Previously a QMap with FilePath as key would return wrong
entries when comparing paths with and without scheme/host.

Change-Id: Icc5d119a18c1b7a2fdab9c89f162c48859926523
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-09 10:21:11 +00:00
David Schulz
5328674479 TextEditor: simplify SyntaxHighlighterRunner interface
Change-Id: I6c8d51d8dccc91514c89267eac2cea66c87a871a
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-09 03:37:22 +00:00
David Schulz
eb95794e67 Debugger: Fix std string view dumper test for msvc
Cdb always report the type name with all typedefs resolved so we have to
check the original type name for cdb.

Change-Id: Ib7166276075b18e011ea786a5d3468db0e24e9c0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-08 08:46:36 +00:00
Michael Weghorn
941ad80d60 Debugger: Add debugging helper for std::string_view
Add debugging helpers for std::string_view,
std::basic_string_view and std::u16string_view
and add a corresponding dumper test for them.

With this in place, values of the local variables in the
"string_view.cpp" sample program from QTCREATORBUG-25865 are
shown as expected on both, Linux with GDB or LLDB and with
an MSVC build with CDB on Windows.

Fixes: QTCREATORBUG-25865
Change-Id: If8959e3225d9ce7f427a65ff6f1f134d3ad48e91
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-07 07:47:13 +00:00
Jarek Kobus
b6a6480084 LookupContext: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews
QSharedPointer impl is poor and it's going to be removed from Qt 7.

Change-Id: Ia7ec4b427c5971d6bd375659b291a9aad2ead253
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-02-06 11:03:16 +00:00
Jarek Kobus
f193aeed47 CPlusPlus: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews
QSharedPointer impl is poor and it's going to be removed from Qt 7.

Change-Id: Id3228355c2883f9229cff3f878655736cc47204a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-02 15:56:25 +00:00
Eike Ziller
02ee8b183e Fix some compiler warnings
Unused lambda captures, unused private field, missing override.

Change-Id: I8b1d9d40af87fdfbd449841e9f112aad4682d8c5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2024-02-02 08:18:03 +00:00
Eike Ziller
a7a06d6f79 iOS: Move launch result from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: I1a7f03c50393b99eddb2bfd34b5857e15b28d0a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-02 08:13:27 +00:00
Eike Ziller
e32d3da321 iOS: Move process id gathering from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: Ic69af99a472976a6c06801a646af59f8139d5624
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-02 08:13:15 +00:00
Jarek Kobus
05c6cffd6b TaskTree: Fix NestedParallelError test flakiness
Increase relevant timeouts.

Change-Id: I80fae036f41f3fef2c38345b86d160a2a9c62d6c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-02-01 16:28:01 +00:00
Jarek Kobus
5cf639341e QrcParser: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews
QSharedPointer impl is poor and it's going to be removed from Qt 7.

Change-Id: I557804bf781b7fa58129242bd94e1566ed3ee304
Reviewed-by: hjk <hjk@qt.io>
2024-02-01 13:25:00 +00:00
David Schulz
d651d8b41f GlslEditor: Fix crash in GlslHighlighter
since the async highlighter implementation the parent is not a
TextDocument anymore, but a QTextDocument. Pass the required mimeType
via the SyntaxHighlighterRunner now to the SyntaxHighlighter.

Change-Id: I0afcbe68719195649b4b7040416a743cb01214df
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-01-31 13:15:44 +00:00
David Schulz
f4b3b85fee TextEditor: Merge Base- and ThreadedSyntaxHighlighterRunner
Change-Id: I38ad01a895eabba99b2e554f3ae9bef85f32bb3b
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-01-31 10:20:56 +00:00
Jarek Kobus
728c03ca7c Async: Disable onResultReady test
To be enabled again when QTBUG-119169 is fixed.

Task-number: QTBUG-119169
Change-Id: I0a889faf3726d53ced11cecfc7c569f6aaa6ffd5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-31 08:49:39 +00:00
Jarek Kobus
8a94c7c758 Process: Fix runBlockingSignal() flakiness
It may happen that textOnStandardOutput() sends multi lines,
even when they were sent by two separate std::cout with std::endl.
Instead of checking whether the 2nd expected line starts with
the magic word, check whether the message contains it.

Limit timeouts so that the test should pass about 3 seconds faster.

Change-Id: Ie4e4df70b62854eb595d41272fe4fa9bdec606fc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-01-30 16:56:32 +00:00
Jarek Kobus
0df72f88c5 Process: Fix flushFinishedWhileWaitingForReadyRead() flakiness
The apparent reason for the flakiness was a time limit of the test.

Change-Id: Idddc8c161f9969522b2eed8317bbda4f59091dd9
Reviewed-by: hjk <hjk@qt.io>
2024-01-30 16:56:24 +00:00
Eike Ziller
2898e09bb4 iOS: Move app URL gathering from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: I2f5312ebadef60239b77308acb7114f1d55143b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-30 10:06:29 +00:00
Eike Ziller
15baf18911 iOS: Move info parsing from devicectl to a function
And add a test to document what we expect from devicectl.

Change-Id: I395171bb5316c21b461a01dce5c9ec87d81fb0c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-30 08:38:03 +00:00
Eike Ziller
a9a5972a9f iOS: Add some autotests for devicectl error parsing
Change-Id: I641f0c86b30a11ca6321db88afbf2969b4863972
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-30 07:56:31 +00:00
Marcus Tillmanns
dbee11f5b4 Environment: Fix incorrect usage of appendOrSet
appendOrSet will append to existing environment variables which is not
what we want for all the changed locations in this commit.

Change-Id: Icf6b110acc59261659839375672943ec21923da1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-01-26 10:33:34 +00:00
Marcus Tillmanns
a25bbf23c6 Utils: Fix error prone default value of appendOrSet
It was not readily clear that Environment::appendOrSet/prependOrSet
needed a value for "sep", otherwise it would just concat the values without separator. This got apparent when looking at usages of
appendOrSet.

Instead there are now three options, "Auto", "Colon" or "Semicolon"
with the default being "Auto", which determines the separator based on
the Environment::OsType.

Usages of appendOrSet and prependOrSet are also fixed with this commit.

Change-Id: I868e14ce38f50be9cd07292fe3f22663a62d116d
Reviewed-by: hjk <hjk@qt.io>
2024-01-26 10:10:03 +00:00
Jarek Kobus
983fc4bcf6 TaskTree: Rename stop() -> cancel()
This better corresponds to done handlers called
in this case with DoneWith::Cancel.

By the way, get rid of unused LocatorFilter::stop().

Change-Id: Ie4246b8d888fff95940a2ed41367d2817bd6339c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-25 09:26:12 +00:00
Jarek Kobus
acf42bf90d Utils: Add synchronizedvalue.h into cmake and qbs
Amends 35a2d598ab

Change-Id: I64d76896c8bfbe4b48e2593118b209e3ae187a87
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-01-25 08:52:05 +00:00
Jarek Kobus
359ab928b1 TaskTree: Add tests for Group's CallDoneIf
Change-Id: I7140c1c7e28f6f503520ad05e6dcd613dcec2df3
Reviewed-by: hjk <hjk@qt.io>
2024-01-24 11:52:40 +00:00
Jarek Kobus
63fc22e274 Process: Change signature of waitForXxx() functions
Change the arg to QDeadlineTimer type.

Change-Id: Id3dee0717e44130c16baf7925e5b06346a1a1ad1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-23 07:09:22 +00:00
Jarek Kobus
afc67468e6 Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:51 +00:00
Jarek Kobus
f6be85b1d2 Process: Refactor timeout handling
Rename ProcessResult::Hang into Canceled.

Change the behavior of the Process:
Whenever the terminate() or kill() is called, including
indirect calls through stop() or runBlocking()'s timeout,
mark the process result as Canceled.
In this way the Process running by a call to start()
may also finish with Canceled state. Before it was only
happening for processes started via runBlocking().

Adapt the runBlockingStdOut_data() test accordingly.

Get rid of ProcessInterface::m_canceledByUser field.
Use ProcessResult::Canceled state instead.

Fix existing 3 usages of m_canceledByUser field.
Use standarized exitMessage() method for them.

Add automatic measurement of process execution.
Introduce processDuration() getter.
Use it for reporting exitMessage() instead of timeoutS().

Change-Id: I1a68559ce844caef863a97a6b0577b0238011f70
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:38 +00:00
Jarek Kobus
290121bc21 Process: Use more rawStd{Out,Err} const methods instead of mutable ones
Avoid using readAllStandard{Output,Error} mutable methods if possible.
Use non-mutable methods when we are not connected to
readyReadStandard{Output,Error} signals.

Change-Id: I2e830e571b9eab2177fd856bbe06dfc5137d9c01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 17:21:25 +00:00
hjk
d234e71643 All: More ToolChain->Toolchain renamings
And removal of one unused function declaration.

Change-Id: I594e23401d8f247d3be081ce850005574951899d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-19 10:29:33 +00:00
Eike Ziller
2865f6eae0 Examples: Read and handle "documentation dependencies"
Some examples are defined in a Qt module (and therefore examples-
manifest), but have dependencies on other modules.

The example-manifests contain a `module` attribute for their
`instructionals` tag, and examples can contain "docdependencies" items
in their meta data, which are comma-separated lists of these module
names. Read the `module` attributes (the meta data is already
generically read) and check if the current set of examples-manifest
contains all required ones for an example. Hide it, if not.

Task-number: QTBUG-120759
Change-Id: Ib8ff80cf8a13965e57b5c4317e5d121c4127278b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-19 09:44:53 +00:00
Jarek Kobus
14f6954026 TaskTree: Disconnect from task's done() signal on destruction
If a task or task's adapter sends done() signal directly
from the destructor (which isn't really desired),
ensure we disconnect from this signal beforehand,
otherwise this may start invoking normal handling of task done()
and interfere with the destruction.

Fix NetworkQuery d'tor.

Add a test for it.

Add some TODO items.

Fixes: QTCREATORBUG-30204
Change-Id: I56a34d0f00c961c15bd1bcffef45520a4be5bce0
Reviewed-by: hjk <hjk@qt.io>
2024-01-15 08:29:57 +00:00
Jarek Kobus
1bf2c447d3 Process: Add a test for starting unexisting process
With different combinations of processImpl and eventLoopMode.

Change-Id: I7a066741f46bc51c1d670527e03358cd77d6b29e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-13 13:38:59 +00:00
Jarek Kobus
7802e475ce Process: Fix EventLoopMode::On
Queue the call to start() so that it's executed after the nested
event loop is started, otherwise it fails on Windows with QProcessImpl.

Fixes: QTCREATORBUG-30066
Change-Id: Ibb17ef0f668f52c05b26a521e18c94e637992ba5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-13 13:38:49 +00:00
Jarek Kobus
85a27b3ddd TaskTree: Implement progress reporting for LoopRepeat
When a number of repeats is known in advance,
make the progress reporting aware of it.

Add a test for it.

Change-Id: I676a4aa9eb469cfe40a2729d231c706dff3ca07c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-13 03:02:41 +00:00