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>
FilePath::hasFileAccess allows a user to test if a specific device
can access files. This is faster than calling "exists()" as it does
not have to actually check anything on the device.
cherry picked from commit 21ef25a0f5
Task-number: QTCREATORBUG-28531
Change-Id: I363ca634d921464fe4ec68397c09fba49dccee25
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For some reason it doesn't like it if the order of adding the buttons
is different, though that works on macOS.
Fixes: QTCREATORBUG-28676
Change-Id: Iea7c595216140dd242cac0aa528699866c4bb1c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@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>
Install the Python module dependencies for qtsdk from Pipfile and run
the install_qt.py and bld_sdktool.py script inside the Pipenv virtual
environment.
Change-Id: Id84733b822964ed2099883de3708f9da2e2d1818
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@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>
Adding a slash to the text in the path chooser for a custom build
directory currently triggers an endless recursion.
This here does not fix the actual problem but at least prevents
the crash.
Task-number: QTCREATORBUG-28682
Change-Id: Ic7d70ccfaccc1fd9437ca41e8b40b027718af6cb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@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>
This is important on macOS, where we cannot install optional plugins
into the app bundle, because that would break code signing.
Instead the install settings in the signed bundle sets a custom plugin
path outside the bundle, and the installer puts optional plugins there.
Task-number: QTCREATORBUG-26705
Change-Id: I8b36752471d16dfc5828e87e20254f39ab985ca2
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>
%1 resolves to "Qt Creator" or "Design Studio", and the message means
that no plugin for that application was found in the extracted zip.
Change-Id: I1f07a3557bdac7dcabf26206aa12fabac0ca272d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
ui_mainwindow.h is being created on first build. While there
seems to be some workaround for qmake-based projects, cmake-based
projects can't be parsed properly before the file was written.
Change-Id: I0e9802f79b60d7d07ed92ca0ae9b93e53249b61f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@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>
There isn't a single license that could be used, so to support this, it
would need to be chosen somehow. Just disable for now, because otherwise
CMake configuration breaks.
Fixes: QTCREATORBUG-28603
Change-Id: I26a01d6ab317ffeb212d6e5517100eaf07963377
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
These files are required when building against some static libraries
that Qt ships. Since we don't link against these libraries, we used to
remove them when we install Qt, but starting with Qt 6.5 some of these
files are required by the Qt CMake files, and configuration would fail.
So, we now have to remove them when deploying Qt, instead of already
when installing Qt.
Change-Id: Ie38ab3735b86df0372b946d6a808007b5ec84b88
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@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>
On macOS if SIGNING_IDENTITY is given.
Creates an extra <plugin>-signed.7z, to not interfere with existing
build setups.
Change-Id: I8ec7f5cbeb14fb749d5d62398916629b83bdb833
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
Try a second time if the wanted menu item is not active when
triggering the context menu the first time.
Change-Id: I742db645542e6775baaa77fbdb1fd5a8e9a120f2
Reviewed-by: Robert Löhning <robert.loehning@qt.io>