As we don't show blame annotations for the trailing
(empty) lines, the following could happen for single
line files:
1. Cursor is in the first line, annotation is shown
2. Cursor is moved to the last line, the annotation
is cleared
3. Cursor is moved back to the first line, but now
no annotation is shown
Fix this by resetting the last visited line when the
annotation is cleared in step 2.
Change-Id: I1ea5dc339f57c94bc1835dcbccd7a9d93f79ffe5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
In case the server returns with an invalid credentials message, the user
shall get a dialog box to enter new ones.
Change-Id: Ied6cc8b0eae6f0cbb49fbfedec282a821ece58aa
Reviewed-by: hjk <hjk@qt.io>
The current code supports Python 2 and Python 3 based debugger backends
(gdb, lldb) at the same time, but we'd like to drop Python 2 support
so we can take advantage of some of Python 3's goodies.
This copy here is not meant to be used in general but could perhaps be
used to replace the main code in situations that cannot use Python 3 yet.
Change-Id: I62273bc41b5a1e3a24720e167e64e4eac2e0c056
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Qt SDK is using the following parameters for sdktool:
"--name", "CMake %CMAKE_VERSION% (Qt)"
This effectively hardcodes the CMake version for the Qt SDK forever.
Fixes: QTCREATORBUG-30019
Fixes: QTCREATORBUG-29973
Fixes: QTCREATORBUG-28437
Change-Id: I05408442ea26d390f60a123be4fbf71f7018b150
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
They are already added by the Python run configuration.
Change-Id: Icfea32e00209a690901cf672a17a8ef5c23b909d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
pdbbridge uses exec() on the main file which causes the inferior to
use its sys.argv. Inferiors using argparse would then fail since they
cannot make use of the working directory passed.
To fix this, append the inferior arguments separated by "--" and
change sys.argv accordingly.
Change-Id: I35caf4b3ec19c5259c0d4235787c03a3e592768a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
... such that it passes with both the built-in indenter and ClangFormat.
The former just indents relative to the previous line, while the latter
considers more context.
Change-Id: I6e837c307728a9d1add16d6eb81880d54bcc89d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We used to follow a Goto Implementation request with a Goto Definition
request, because the latter gave us the declaration instead of the
definition. This has changed in clangd 17, which means we now called Goto
Definition on a definition, which clangd interprets as switching to the
declaration.
We now do the right thing for all supported clangd versions.
Change-Id: I1c0acd2c8d5c942f7e25dedb1da953bb4f8d8d13
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's enough to remove just one item, as it's guaranteed
that items are unique inside the m_children vector.
This should fix the following warning:
"ignoring return value of function declared with 'nodiscard'
attribute [-Wunused-result]".
Change-Id: Iae8a11d1f12cd28ef3c4ae4363a4bdc3dbfe31e6
Reviewed-by: hjk <hjk@qt.io>
- Check condition only once
- Make sure correct length is being used
Change-Id: I8c9627d91b4f022d60bae039c0478248cc30d183
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes it possible to jump to Qt Test data tags using the locator.
Change-Id: I9b4590b0520a59675cd05055ee07918aa0dcf08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If the Qt platform plugin fails to load, most famously xcb on systems
that do not have libxcb-cursor0 installed, the interesting messages are
only written to a terminal, and not visible when running Qt Creator from
e.g. the installer or dock.
Temporarily install a special Qt message handler that scribbles along
the qWarnings and qFatals while creating the QGuiApplication, and make
it output the messages via xmessage in case a qFatal is received (and
xmessage is available). On macOS show a dialog with osascript. Windows
already gets a dialog from Qt proper.
Also add the explicit message about (lib)xcb-cursor0 for Qt versions
that do not have it yet.
Fixes: QTCREATORBUG-30004
Task-number: QTBUG-108796
Task-number: QTCREATORBUG-29873
Change-Id: I5e5dafb398db6a72178413c8b883325c56d9a016
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
When the debugger is quit, connectionStartupFailed will trigger and
show a useless message box about not being able to connect.
This can also trigger a crash in WatchHandler::cleanup if the user
quits Creator while a debugging session is still running.
(as seen on macOS).
Change-Id: I19461d5cdd449e58e530b09b772431b3cf18c52f
Reviewed-by: hjk <hjk@qt.io>
QtMCUs package is part of every target with the same pointer address across all
targets, when reseting the target packages to default this will cause
inconsistensy as the default path for QtMCUs package is the home directory.
Fixes: QTCREATORBUG-29960
Change-Id: I2fcc6b631355928bc883e9072b0f3f3c12737c37
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Karim Abdelrahman <karim.abdelrahman@qt.io>
Users don't add QDB device themselves and therefore device test isn't run.
This means neither rsync or sftp is available with GenericUpload deployment.
Ideally, we should run the device test in the background but that would
require larger code refactoring to support it. For now, set all QDB devices
with support for both rsync and sftp. Host's support will still determine
if either one can be used.
Change-Id: I1f73508b9255e0984ca48c763dcaf49b931e0e21
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Ari Parkkila <ari.parkkila@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
When building using CMake it's possible that single CMakeLists.txt may
contain multiple android executables. In this case android-build
directory mixes the build artifacts from multiple targets. This patch
allows using per-target android-build directories in case if Qt support
this. The QT_INTERNAL_ANDROID_TARGET_BUILD_DIR_SUPPORT cache variable
indicates that Qt has builtin support of this feature and the
QT_USE_TARGET_ANDROID_BUILD_DIR cache variable should be set to TRUE
by user to enable the functionality project-wide.
Task-number: QTBUG-117443
Change-Id: Ic8f576e528ee918a3ebf075a25fa2a414ef85736
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Instead of using StorageBase. In this way the StorageBase
is eliminated from the public API of the framework.
Move start() method of adapters into private sections.
Change-Id: Ia105706315c3ed7accab7c9304bb692368995b63
Reviewed-by: hjk <hjk@qt.io>
- Add a link from the "Getting Started" page to make this topic
easier to find
- Add disclaimers as notes
- Remove link to GitHub (not official)
- Add link to Qt Account where users can also get the packages
Task-number: QTCREATORBUG-29594
Change-Id: I7e667a142e3094c9a0002f0299e104a9b1e8a7ed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Add the Medium font families.
The Medium variants make sure that on a MacBook Pro with Retina display
the font doesn't look out of place being too thin.
Taken from https://github.com/adobe-fonts/source-code-pro/releases/tag/
2.030R-ro%2F1.050R-it
We need to stay with version 2.0.30 due to hinting on Windows, and to
force QFont::Medium on macOS due to the fact that the medium font is not
picked up. Newer versions like 2.0.42 do not have this issue.
Task-number: QTCREATORBUG-29964
Change-Id: I4c0fba5730c4a6b869d900642b675698c29c6ae8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
That can happen for example, when having a file with active
Instant Blame open and choosing "Save As" to save a copy
of that file in a folder not under version control.
Also fix the related case, when the file is saved in the
same folder, but is not under version control yet.
In this case, let's remove the blame mark, otherwise it
will stay forever as we only stopped the cursor connection.
Fixes: QTCREATORBUG-29991
Change-Id: I6ffed869c18334ba87dbcded409d31ead21f4b25
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This reverts commit 8608dc9556.
Reason for revert: This commit will make configure times slower on every CMake run. See https://gitlab.kitware.com/cmake/cmake/-/issues/25440
This is visible on a project like Qt Creator. Having the generating step go from 5s to 15s on a Windows setup does not justify the gain of having one configure step for multiple configurations.
Change-Id: I17c28e4ddbe27024b7eaee1cfff87d122a740ab4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>