Commit Graph

84931 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Christian Kandeler
73f8854263 ClangCodeModel: Fix following virtual functions
Don't indirectly trigger the regular callback once the proposal widget
was shown.
Amends 09e495f01a.

Change-Id: I9d2411f88c69488d63462318f48cef4a0eeeaed1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-01 13:43:33 +00:00
David Schulz
5d14e580ea ProjectExplorer: show kit warning in the wizard target setup page
Change-Id: I9aac268b902ed0a2dfd544811028affb480ed4d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-01 12:22:52 +00:00
David Schulz
a006c61507 JsonWizard: only check valid platforms
Change-Id: I6cb27b2b55dc82e5b04d060708ef2526e0a36461
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-01 11:51:47 +00:00
Friedemann Kleint
b6c3de310e Fix crash when loading a .pyproject into Qt Creator with empty settings
The build system is 0 as long as no kits are created.

Change-Id: Ia7f283071740dabe76ff3dd6b2f59e5ca214b7c2
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-01 08:51:36 +00:00
David Schulz
c0a3565362 Python: Create a default BuildSystem for Python targets
This makes sure the project can be parsed even if we do not have a valid
build configuration for that target.

Amends 09e94ae4ac

Change-Id: I92214474f581af228bd5c2aaf2f3e4b620ffc9d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-01 07:01:10 +00:00
Christian Kandeler
21c078773f CppEditor: Un-skip some tests in clangd mode
These are passing now.

Change-Id: Iec784b9e85a0f06266efff2f301f82891d343d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-30 14:41:35 +00:00
Christian Kandeler
e3e9ca05c5 CppEditor: Consider clangd in SelectionsTest
Change-Id: I5e17b9c0e5c55c96c3d0f487872ffd1141bced33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-30 13:46:10 +00:00
Christian Kandeler
a6150da076 CppEditor: Adapt function declaration
... when changing the name of a function parameter from a point of use,
rather than from the definition.
The normal function decl/def link mechanism only covers editing in the
signature.

Task-number: QTCREATORBUG-29925
Change-Id: I34ff90117685184b9fc72937b401976274f4876c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-30 12:42:04 +00:00
hjk
2bb29fd9b0 GenericProject: Use new setup for GenericProject itself
Change-Id: I8c18cd5372de1179bf6ebdcfabc6c50ac8f6d50f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-29 17:43:48 +00:00
Leena Miettinen
7fd20e98d7 Doc: Edit info about state chart editor
- Convert paragraphs and lists into tables with icons to allow
  users to browse easier
- Move the info about using the wizard into a how-to topic
- Add subtitles
- Move the topic to Reference

Task-number: QTCREATORBUG-29361
Fixes: QTCREATORBUG-29766
Change-Id: Id9c1aabd8f3a7bfb0659898dd329cedbcbb5f697
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-29 15:23:51 +00:00
Leena Miettinen
09144e7a7f Doc: Describe how to get Qt Creator
Fixes: QTCREATORBUG-29594
Change-Id: Ic05329223cd32307b8474fc71c622c9f96d9d25b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-29 14:30:50 +00:00
Eike Ziller
d7ce872f80 Fix state of side bar buttons when switching different design widgets
When switching between different editors in Design mode (e.g. ui and
qml), the side bar buttons must update. So far they reacted on mode
switches, but not on changes of the main window while staying in the
same mode.

Change-Id: I85635f12bb8613e90ec81056d8763431c04fea2e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-29 10:36:59 +00:00
Christian Kandeler
e0a06cda28 CppEditor: Allow tests to run with ClangCodeModel enabled
So that in the CI we can simply run:
  $ qtcreator -test CppEditor -load ClangCodeModel
There are some failures left, which we will tackle one by one in follow-
up patches.

Change-Id: Ic4ebcb82f6439b344ae055889a6a16d56b2e3206
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-29 09:46:24 +00:00
Christian Kandeler
711b976294 CppEditor: Also rename function comments for declarations
... that are not definitions.
Amends 0a058bb657.

Change-Id: I4ba19f915d653d05570f8cd244ea50ab40d4b9dd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-29 09:42:18 +00:00
Eike Ziller
1f34461088 IMode: Make main window an (optional) property
Un-virtualize IMode::mainWindow. If the mode widget is a main window
directly, that is handled automatically, otherwise provide a setter. It
is better to have a central point for setting it, in case that it isn't
the mode widget in the first place. Also, using Aggregation::query for
this is actually a misuse of Aggregate, which is supposed to combine
_independent_ objects, not objects that are in the same hierarchy (which
can crash if the child object is deleted first).

Change-Id: I35381e0a05645022aac72501492ea6347953cd55
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-29 09:22:57 +00:00
Eike Ziller
8d851fab0b IMode: Create private class
Change-Id: I64bafc4b8f73b78b7c775192c247ed635a367a39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-29 09:22:43 +00:00
Christian Stenger
a149c52e99 SquishTests: Start expecting Python kits
Python kits will be new in QC13. Do not let the squish tests
fail in case it stumbles over one.

Change-Id: Ic0af56f49321f6d5800d11398d2e73b21c25e51a
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-11-29 08:23:40 +00:00
David Schulz
78a4dbd2af ProjectExplorer: only show relevant Aspects in tooltip
Change-Id: I7dd1aafe980724c6a950533bf0055f37c47e68fe
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-29 05:20:30 +00:00
David Schulz
48a77b5b09 Revert "Aggregation: Fix crash when components are in parent-child relationship"
This reverts commit 12428bf1d6 because it triggers a qassert
in QObject::setParent when the object is a widget.

Change-Id: Ib9b76192f548cd3201fcb78a19ea88ccb5782ba2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-29 05:20:19 +00:00
Eike Ziller
a35deb1532 Use sidebar buttons for hiding/showing dock areas
So far, if a mode includes navigation widget placeholders, these are
used for the sidebar toggle buttons, otherwise the buttons are disabled.

Now, if a mode does not include navigation widget placeholders, but the
mode has a FancyMainWindow attached, use the buttons to hide or show the
corresponding dock widget area (left or right).

Since QMainWindow does not really support "hiding a dock widget area",
the FancyMainWindow needs to track that state manually, by tracking the
dock widgets that were visible before "hiding the dock widget area".

Also, if a dock widget is dragged into a "hidden" area, or a widget is
made visible or "unfloated" into that area, show the other widgets in the
area again as well, "unhiding" the area.

Since the mode widgets that have a mainwindow somewhere usually wrap
that into a splitter for the output panes, and the Design mode is
actually a stack widget, IMode needs another method that returns the
appropriate FancyMainWindow if available.

The patch implements this for Widget Designer.

Change-Id: I03531f4d5130c846ff5d65831b1c9be210e1c561
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-28 13:17:22 +00:00
David Schulz
09e94ae4ac Python: use kits page in python wizards
Change-Id: I1f7aaf145443481546abb868c8c167186600b848
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-28 12:17:14 +00:00
Eike Ziller
12428bf1d6 Aggregation: Fix crash when components are in parent-child relationship
and the child is deleted first.

Change-Id: Idea3b4a3410bda99a8727551e2cbeab3a7b95d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-28 12:00:08 +00:00
Christian Kandeler
40d5a90bbc ProjectExplorer: Compress folder nodes bottom-up
That's the conceptually correct way to do this operation. Fixes lots of
randomness and results in simpler code.

Fixes: QTCREATORBUG-29923
Change-Id: I1f391c323ecdeeb5b8def9b4c56ad5206661edcb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-11-28 09:23:46 +00:00
hjk
c463f944e9 ProjectExplorer: Rename ToolchainManager signals and members
Change-Id: I5195cb785f91dbaafdeeb8bb8c71939a6e3ff9e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-27 16:45:02 +00:00
hjk
b5937836f4 ProjectExplorer: Rename ToolChainManager to ToolchainManager
Plus the private and some comments.

Change-Id: I95d72d77f25cb1c969a1a6148e7186150a697d1f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-27 16:33:34 +00:00
Christian Stenger
bd849b615e QbsPM: Fix qbs build
Amends ba249a3514.

Change-Id: Ieda665923434510ab5fe6b17776dbac07262d2a8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-27 14:36:43 +00:00