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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
And add a test to document what we expect from devicectl.
Change-Id: Ic69af99a472976a6c06801a646af59f8139d5624
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
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>
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>
And add a test to document what we expect from devicectl.
Change-Id: I2f5312ebadef60239b77308acb7114f1d55143b4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
And add a test to document what we expect from devicectl.
Change-Id: I395171bb5316c21b461a01dce5c9ec87d81fb0c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
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>
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.
Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
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>
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>
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>
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>
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>