Commit Graph

85691 Commits

Author SHA1 Message Date
Friedemann Kleint
332a742e0b pdb: Fix command line arguments
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>
2023-12-06 12:20:48 +00:00
Eike Ziller
ade5ebd95f Add change log for 12.0.1
Change-Id: I077362b4ddb4fc09d66e682c9e12775a33d822b7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-12-06 12:19:22 +00:00
Christian Kandeler
ee4493ffa4 CppEditor: Fix a test
... 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>
2023-12-06 11:49:02 +00:00
Christian Kandeler
6d101cd812 ClangCodeModel: Fix following virtual functions
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>
2023-12-06 11:48:47 +00:00
hjk
997f28347b CppEditor: More direct access to CppQuickFixAssistProvider
Change-Id: I764b68ee2f328cff28b4c6482d28015b36f15bca
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-06 11:44:14 +00:00
Jarek Kobus
e8923d3333 TaskTree: Use find_if & erase
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>
2023-12-06 09:01:46 +00:00
Robert Löhning
5c1b8dee32 SquishTests: Simplify and stabilize special handling of Mac menus
- Check condition only once
- Make sure correct length is being used

Change-Id: I8c9627d91b4f022d60bae039c0478248cc30d183
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-06 07:35:12 +00:00
Andreas Loth
22a9143439 Axivion: Prepare reading the credential from a password store
Change-Id: I0fed28f91fa296f8e57389b76a4f986d6f8f5bac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-12-05 15:14:20 +00:00
Christian Stenger
bc64be06d7 AutoTest: Provide locator for finding data tags
Makes it possible to jump to Qt Test data tags using the locator.

Change-Id: I9b4590b0520a59675cd05055ee07918aa0dcf08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-05 14:45:00 +00:00
Christian Stenger
938a230dd0 CMakePM: Extract functions for later reuse
Change-Id: Id933c545328300398a2fa38fa82e0c593f501406
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-12-05 14:43:12 +00:00
Leena Miettinen
f708e200f9 Doc: Restructure info about build and run configurations
Task-number: QTCREATORBUG-29361
Change-Id: I9e9d3a3448c327938e4f647b37a88857db5b16c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-12-05 12:30:54 +00:00
Eike Ziller
a6a95420b6 Main: Show a GUI message if platform plugin fails to load
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>
2023-12-05 12:04:45 +00:00
Thomas Hartmann
9184db8dfb StudioWelcome: Fix help url for getting started
Task-number: QDS-9780
Change-Id: I32a3f5782cda1611ce12588873ac6f45620adf52
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-12-05 10:48:18 +00:00
Marcus Tillmanns
f7b1eed0c2 QMLJS: Fix deadlock on session switch
Fixes: QTCREATORBUG-30016
Change-Id: I17d2b068e1bdb2fcad182209ca08a652b0957fa4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-05 10:48:02 +00:00
Marcus Tillmanns
0a07080afe Utils: Add lock/unlock to SynchronizedValue locks
Change-Id: Ic0f091a101e68e910243c9ac32340431cebeff68
Reviewed-by: hjk <hjk@qt.io>
2023-12-05 10:47:56 +00:00
Marcus Tillmanns
ed52d07727 Qml Debugger: Don't complain about connection
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>
2023-12-05 10:47:09 +00:00
Yasser Grimes
9a364811de McuSupport: Ignore resetting QtMCUs package on target update
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>
2023-12-05 10:18:22 +00:00
Marcus Tillmanns
d2c03f771b Utils: Add ToggleAspect
Change-Id: I2de41811c0c039cd52d48aab98e0c65706d21a74
Reviewed-by: hjk <hjk@qt.io>
2023-12-05 09:31:30 +00:00
Jarek Kobus
3597dbcb61 TaskTree docs: Fix the code snippet
Change-Id: If2274abab0baca04a852aca0a7602aa3d997a428
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-12-05 08:22:21 +00:00
Aleksei German
500febad25 QmlDesigner: Fix for Basic Controls style
Task-number: QDS-10980
Change-Id: Ia50bbe602dc54b5684c1ee432052e8c33559ef7f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-12-05 08:18:57 +00:00
Samuli Piippo
5460a0d5f6 boot2qt: QDB devices support rsync and sftp
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>
2023-12-05 06:54:04 +00:00
Alexey Edelev
4eedc4b2d0 Default the QT_USE_TARGET_ANDROID_BUILD_DIR value to TRUE
Set QT_USE_TARGET_ANDROID_BUILD_DIR to TRUE if Qt version
greater equal 6.8.0.

Change-Id: I051b7c1762858aac798eac167c491ccc68b65cf1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-05 06:45:14 +00:00
Alexey Edelev
de3d4e23ea Add the support for target-based android-build directories
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>
2023-12-05 06:44:44 +00:00
Marcus Tillmanns
88c12bc784 QMLJS: Fix deadlock
Change-Id: Ib93d2e43ed0cdb7708886224fdf7392c96f984ca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-05 06:22:12 +00:00
Robert Löhning
c0d1975ff9 SquishTests: Fix fetching Jira status
Change-Id: If01b08673f88588eee9370488a429a6f633d93db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-04 17:49:18 +00:00
Jarek Kobus
ca08f3d05d TaskTree: Use Storage<StorageStruct> inside GroupItem's c'tor
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>
2023-12-04 16:02:01 +00:00
Artem Sokolovskii
72a4806795 DAP: Add support function breakpoints
Change-Id: Ia3644251d105f437241c54c13cdaa53e942ea8a0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-12-04 15:30:06 +00:00
Artem Sokolovskii
5df3dba28e DAP: Add Capabilities structure
Change-Id: I83a82a812f0d15925cc0d75ca566e1d001e42a7a
Reviewed-by: hjk <hjk@qt.io>
2023-12-04 15:29:50 +00:00
hjk
f130918026 ProjectExplorer: Rename GccToolChain to GccToolchain
And some related classes/comments.

Change-Id: I9a0661f1a040de594145d403c673ec2e54990e0d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-04 15:23:48 +00:00
hjk
ddf39cd0dc ProjectExplorer: Rename various items in the Toolchain class
Change-Id: I544763d3b4d521f6bbed0dc5a767c15c49055a19
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-04 15:10:08 +00:00
Artem Sokolovskii
8bec598d4c DAP: Add support ignoreCount and condition for breakpoints
Change-Id: I699104c4b1cbbc205722bb9a73c63782b4fdb926
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-04 15:07:12 +00:00
David Schulz
eb740bdd95 Debugger: add python debugger setting in run configuration
Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-04 14:56:27 +00:00
Leena Miettinen
5034936333 Doc: Fine-tune the How To: Install Qt Creator topic
- 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>
2023-12-04 14:01:06 +00:00
Cristian Adam
e8262ed930 CMakePM: Fix crash (potential) on CMakeParser::flush
Use the Task copy for the inversal of the call stack.

Amends edf4280bd9

Fixes: QTCREATORBUG-29965
Change-Id: I6119e03c75ff5a7d44f86e91cc93e6417fea1689
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-04 13:37:15 +00:00
Cristian Adam
13dc66a08d Fonts: Add Medium SourceCodePro font variants
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>
2023-12-04 13:37:02 +00:00
Christian Stenger
f73e7076cb Macro: Fix validation of save dialog
Change-Id: I2a19e2954057b816152d6c5a01648f4b6db0a3ed
Reviewed-by: hjk <hjk@qt.io>
2023-12-04 13:19:59 +00:00
Andre Hartmann
c0d7835022 Git: Stop Instant Blame when git returns empty blame data
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>
2023-12-04 13:07:45 +00:00
Cristian Adam
b8d568979c Revert "Use "Ninja Multi-Config" generator by default in configurePresets"
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>
2023-12-04 12:44:24 +00:00
Marcus Tillmanns
097b24b77a qmljs: Use Utils::Locked in ModelManager
Improves access to locked data by using read/write locking.

Hardens thread safety by making sure that locked data is only
accessed when lock is owned.

Change-Id: I169fcd650cd905fc8625a341104ffbccc4c7c7c8
Reviewed-by: hjk <hjk@qt.io>
2023-12-04 12:44:00 +00:00
hjk
da15f6fa0c WebAssembly: Move the device infobar setup to the device files
Change-Id: I201c0f1dba59530e9e8183cb24974baed049196e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-12-04 12:35:17 +00:00
hjk
e729c37d95 WebAssembly: Convert to new plugin setup scheme
Change-Id: I7d5def6084a0cc2cf164a4d72b693b44f8be7005
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-12-04 12:16:47 +00:00
Ali Kianian
8f6e90783c QmlDesigner: Fix the bug for importing json file
- Json objects are considered valid in the json arrays.
- Json arrays are removed from the row objects.

Fixes: QDS-11472
Change-Id: I89d7fb6d12952a994cf5e3aab0869154a3ab5d27
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Shrief Gabr <shrief.gabr@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-12-04 10:49:29 +00:00
Tasuku Suzuki
0afd50aa33 Git: Improve upper part of layout
In small screen, General Information and Commit Information fill more
spaces than their importance.
This commit changes their layout from vertical to horizontal.

Change-Id: I919f1ac5fd02f32fda54698b012330ecebbd6ab0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-12-04 10:36:55 +00:00
Marcus Tillmanns
0e59c9e4e1 Utils: Add "findOr(..., nullopt, ...)" function
findOr(nullopt) returns either a value or a std::nullopt for the first entry
in a container where the predicate returned true.

This makes it easy to write constructs like:

if (auto found = Utils::findOr(container, std::nullopt, [](auto){ ... condition ...}) {
...
}

Change-Id: I6f8f0f9c0d8486c32395123d8c2dcba427887189
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-04 10:24:17 +00:00
Miikka Heikkinen
11a84a8754 QmlDesigner: Fix content library license check
Fixes: QDS-9680
Change-Id: I96a85bba779f373144fb04b4ede4b39f898957e6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-12-04 10:21:17 +00:00
Christian Kandeler
f073db7f4c ProjectExplorer: Fix "unavailable" annotation of fixed run configs
Amends 058a931d27.

Fixes: QTCREATORBUG-29983
Change-Id: I4db546d1370909b55d6662d403be10e263c4e878
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-12-04 10:06:44 +00:00
Ali Kianian
70f9e35c62 QmlDesigner: Polish the ui of the Model Editor
- The main toolbar of the Model editor is aligned with the rest
  of the ui
- Update/Save icon is updated
- Tooltips for save and export actions are modified
- Minimum size for the Model editor is applied

Fixes: QDS-11449
Fixes: QDS-11244
Change-Id: Ice389ae439ac855eb3a5d3197a2365e6d2506a90
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-12-04 10:06:10 +00:00
Marcus Tillmanns
4153520fb6 TextEditor: Allow opening links without filename
... in editors displaying a document without a filename.

Change-Id: I857018e2532b406a37983d8fd77e52daa31ae70d
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-12-04 08:33:11 +00:00
hjk
b380c2eb20 Valgrind: Use new setup pattern
Change-Id: I7f2651d12a80d56f6a4be63c5c63eba0ad3a4447
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-04 07:46:32 +00:00
Cristian Adam
3204002055 CMakePM: Check if the callStack optional has value
Amends edf4280bd9

Task-number: QTCREATORBUG-29965
Change-Id: I7deb6d5952cceaa1f238cdd02393a369c56e0376
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-12-02 16:56:12 +00:00