Since the find of QTextDocument is line based, it is not possible to
find selections spanning multiple lines in the editor. Triggering a find
on a search term containing a paragraph separator returnes an invalid
QTextCursor which always result in searching from the beginning of the
document in the add cursor for selection logic. Prevent that by checking
the selected text beforehand and add a safety net in the loop to verify
that we do not start over again on an invalid TextCursor.
Fixes: QTCREATORBUG-28709
Change-Id: I8c1b9d16e707fefbba6dc0a0a9ef21b8c82ebe19
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
In the configure environment for MSVC toolchains.
The MSVC toolchain actually overwrites the PATH environment (triggered
via kit()->addToBuildEnvironment(result)), which it shouldn't.
But this is a minimal fix for Qt Creator 9.0 that also is in line with
what BuildConfiguration::baseEnvironment() does.
Fixes: QTCREATORBUG-28685
Change-Id: I0cb8e3c84419403672175bd581c16d90902e23ba
Reviewed-by: David Schulz <david.schulz@qt.io>
This basically reverts commit 7684571e10 as it broke running
the test inside the debugger.
Change-Id: Iacd46e2b9fb5af813fbf17156fd847375d750480
Reviewed-by: David Schulz <david.schulz@qt.io>
- add its own settings key so it gets saved into the project settings
- read the correct placeholder text, commandLineGetter is set too late
and would also create a loop (qmlViewerAspect is used to get it)
Change-Id: Iee3458cfe84e3f6b6750aa14d9d89347da21b37c
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Wheel scrolling was disabled for combo boxes in Qt Creator 9, because it
created more issues than it solved. Instead of completely disabling it,
allow wheel scrolling when simultaneously holding Ctrl.
Fixes: QTCREATORBUG-28578
Change-Id: I08bccf039b60035bf425fac95b6af6fad349f43a
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Data functions and special functions may get handled as normal test
functions which obviously fails when executing tests.
Change-Id: I630fedcdbcc7577c1896f8cccbe77008a623900f
Reviewed-by: David Schulz <david.schulz@qt.io>
This adds a QTC_KIT_DEFAULT_CONFIG_HASH variable containing the hash of
all the default Qt Creator CMake kit variables:
* CMAKE_C_COMPILER
* CMAKE_CXX_COMPILER
* QT_QMAKE_EXECUTABLE
* CMAKE_PREFIX_PATH
This way when a CMake preset changes any of these CMake variables a new
Kit will be created. Otherwise a previous kit containing different
values will be used.
Fixes: QTCREATORBUG-28609
Change-Id: I77b67e9c8fa15dc3ff2f22c5b63d4ca1c7670fdc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Relative paths are resolved based on the applicationDirPath, so reflect
that in the path chooser too.
Also, do not resolve relative paths in the path chooser to absolute
paths when writing to the settings.
Change-Id: Iaeffa2cad1e145adbbc5c918b5f8ff14f6f2b31e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The final selection is not tracked in m_selections and needs to be
handled explicitly. Also add an assert preventing unconditionally
accessing an out of bounds element of m_selections.
Fixes: QTCREATORBUG-28631
Change-Id: I1898418b1126bdaffccbdf0e483e2c659d191917
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
ANDROID_NATIVE_API_LEVEL is not handled by the android toolchain files
starting the NDK version r23b. We should set ANDROID_PLATFORM instead,
to specify the NDK platform version, that exists in all NDK versions
supported by Qt. Also the ANDROID_PLATFORM variable expects the
'android-xx' format as a value, so avoid cutting the 'android-' prefix
when adding the value to the CMake configure string.
Fixes: QTCREATORBUG-28624
Change-Id: Idd4ba472e46982162e5ad74e9fc6868e50e3b434
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
You can have a preset with the PATH environment variable modified and
with CMAKE_C|XX_COMPILER CMake variables only as "gcc.exe" and "g++.exe"
Qt Creator now will search in PATH after the compiler file names and
work as expected.
Fixes: QTCREATORBUG-28602
Change-Id: I8520f6fcf5e542600fab08228d04d3709d3a8e8f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Checking whether a position is inside the first line is also not for
free. Only check the line number of a cursor position if we expect the
editor to have multiple lines per block or in other words line wrapping is
enabled.
Change-Id: I0e3cb1fbd11c250677f7c11d1a5c780f60085ec2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
QTextLines cursorToX indirectly calls shapeText which is not for free.
We just want to have the x position for the line so there is no need to
shape the complete text to get the position of the first cursor.
Change-Id: I0ae636ed8250385b7ac77c6f37d45922bbf2e9bf
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
An error is expected to contain an error message so add one that misses
one. Additionally assert when trying to set an error to a response that
is invalid (does not contain message or code.)
Fixes: QTCREATORBUG-28598
Fixes: QTCREATORBUG-27856
Change-Id: I0631433d847610531758d297a93a5c7cdfdc6c1d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... when filtering compiler options for MSVC macro extractions.
Otherwise we end up with a stray command line argument, breaking the
call to cl.exe.
Fixes: QTCREATORBUG-28016
Change-Id: I29979a4b968d2056a0feba61fee01d5ddc9aa28f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When Qt Creator is installed in a path with underscore.
Amends 451d02c88d
which changed the pattern matching from file name only to the whole
path.
Fixes: QTCREATORBUG-28591
Change-Id: Ice6a7cb34fd2bb98c384a3b7cb573614bb7a43b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Broke when inlining the .ui file. Because the two checkboxes no longer
have the same direct parent, "autoExclusive" does not work, and it needs
an explicit button group.
Amends 4933697d9a
Fixes: QTCREATORBUG-28525
Change-Id: Ia6af5f6083975faa5a65cdc9dd0bd2b671af147b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Don't repeat the main symbol as its child inside
derived hierarchy. The regression was introduced
when addDerivedHierarchy() was added.
Amends e2155a91df
Change-Id: I34cd19be4307d355ea84fbdb64a06d0d3505e8a9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This is just a workaround for 9.0 and not a proper fix!
It looks like sometimes kill command may freeze. Don't blocking
wait for it for 30 seconds - limit this time to 2 seconds.
Do the same inside SimpleTargetRunner. Pretend the process
finished after 2 seconds, otherwise the SimpleTargetRunner
object gets leaked and we start receiving asserts from
ProcessLauncher about destructing it when still some processes
are being run.
Task-number: QTCREATORBUG-28072
Change-Id: I9766e7ff6f0c2abf2010686027702d30d32c4318
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
The original intention was to connect to done signal
of the executed command.
Change-Id: I35e1f931a54bf763c3d9ffc71237b1d96cda1343
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
I bet the original intention was to return a new message,
so we should assing a new value into the passed pointer
rather than change the local copy of a pointer so that it start
pointing to the local variable.
Amends aaa8beab88
Change-Id: I1fdc8f3f4ea43e4814f02dbf615ad128bfc9a059
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
It may happen that we dereference null inside the following
condition:
if (declarator->postfix_declarator_list)
This may happen in case we entered the "if (!declarator)"
condition, but didn't fulfill the nested
"if (path.at(n - i++)->asPointer())" condition.
Detected by clazy analyzer.
Change-Id: I47135bc5648459e91664a4f65f9752b58248a496
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Detected by clazy analyzer. The possible context was
TextEditorWidget::dropEvent(). In some branches we ensure
that mime is not null, but later we call insertFromMimeData()
unconditionally.
Change-Id: Iee5138bc19d405050eafc9617d3c2ed123b767c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
By defining QTC_NO_MSVC_CLEAN_ENV one can skip the vcvarsall.bat /
clean_env functionality.
Task-number: QTCREATORBUG-28561
Change-Id: I6392b2278008607042a43a38a2c38669b4b52183
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Changed when removing .ui file. Call order is important here.
Amends b3e3de517d
Task-number: QTCREATORBUG-28536
Change-Id: I04d9351f8bb7f2ed170f3643ba84af5f8afe35ab
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
The Windows registry node containing the installation path of IAR
workbench changed since version 9 that is the same as the one for
32-bit Windows host. Multiple registry keys will be used to identify
the latest IAR toolchain as well.
Task-number: QTCREATORBUG-28245
Change-Id: I92ed0c10a38e081ca45fcf9e543d902a3e98efc2
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Especially on non-casesensitive OS we may get the information
regarding break point locations with a wrong case which would
try to set a break point and silently fail as the files are
internally used with their correct case.
Change-Id: I32a780629e1b10ea075d669b8eca812fbd994600
Reviewed-by: David Schulz <david.schulz@qt.io>
When building type hierarchy the pointers to list
elements were put into queue. Later, the list was
modified and it was possible that list detaches
causing stored pointers to be invalid.
Simplify building type hierarchy by adding helper recursive
methods.
Fixes: QTCREATORBUG-28529
Change-Id: I240513fc097536d2175e2242766127b92aaa6a82
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The preferences dialog is modal and creates an event loop that would be
running within the mouse event handler of the widget. When the dialog is
closed after the widget is destroyed (i.e. after indexing finished),
control would be passed back to the destroyed widget, and crash.
Fixes: QTCREATORBUG-28566
Change-Id: I71efa683822b5682ad1b38c39ce8f73c89bdd610
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Without this we cannot identify the aspect when trying to retrieve the
settings. Therefore, we always run without any settings, and in
particular with an empty command line for perf.
Fixes: QTCREATORBUG-28545
Change-Id: Ia419c939d57ff65eca4992faff02c121ca20c83f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>