Commit Graph

72811 Commits

Author SHA1 Message Date
Eike Ziller
3b6dc15e04 Fix that target selector accumulated labels again
It was previously fixed in  1a43983ea6

Since then, adding the aspect to grid adds a label itself, so the self-
created label in setKit is irrelevant (it adds some empty space), and
the labels that are created for the aspects are accumulated again.

Instead of trying to delete the labels, create a wrapping QWidget.
Deleting this widget gets rid of any widgets that might have been added
when creating the grid of mutable aspects.

Fixes: QTCREATORBUG-29990
Change-Id: I5f2aebf9a865e532c9e24a29ec5979b11d17d43a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-29 13:28:26 +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
c20129a973 ClangCodeModel: Make VirtualFunctionAssistProcessor more safe
Let's not access the object state after emitting
ClangdFollowSymbol::done(), in case the receiver deletes us.
Can happen in test code.

Change-Id: Ia6c691c0f88b16476da1a6be1cedd106d9da2d53
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-29 09:48:30 +00:00
Christian Kandeler
6ed456ed9e ClangCodeModel: Fix check for strings that look like file paths
Backslashes in the markup string are escaped with another backslash, so
we need to check for two consecutive ones on Windows.
Otherwise, qdoc/doxygen commands such as "\note" are interpreted as files
and trigger expensive I/O operations.

Fixes: QTCREATORBUG-29975
Change-Id: I822f57a8612274ff4112063928cab21b9d7ca792
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-29 09:47:46 +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
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
Thomas Hartmann
fa376883f0 QmlJSCheck: Ensure that ::createObjectsForImport always works correctly
If ::createObjectsForImport is called twice, then
m_objectsByQualifiedName already contains the type and an empty list is
returned. The returned list is used for the prototype lookup and
in this case the import is empty and the prototype cannot be found.
This happened for QtQuick3D.Effect when used from QtQuick3D.Effects in some
cases. There is a race condition. The second call to ::::createObjectsForImport
is quite rare.

Task-number: QDS-11069
Change-Id: I6dfe152224172d0d626625d24a53f36d4219372f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2023-11-28 15:52:49 +00:00
Alessandro Portale
a71b33944b Core: Restore opening of files that are dropped on the MainWindow
The code to handle dropping unintentionally got commented out, then
fixed, then commented out again.

This change restores it.

Amends: e5f74d217b
..which amended: 5da1f14903
..which amended: e34762c844

Fixes: QTCREATORBUG-29961
Change-Id: Iccc8a9b7bc24bc3475ed4fa37a7c231a1f575c1c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-28 14:03:21 +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
Marcus Tillmanns
a27aceb558 CompilerExplorer: Add user-agent
Change-Id: Ia2193a1cf9bd0b3542313162d6befe14649efe97
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-28 13:17:09 +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
Samuli Piippo
ed4dadfcc1 boot2qt: use DirectUploadStep on Windows
GenericUploadStep doesn't set execute rights to the binary when
deployed from Windows host. Switch back to DirectUploadStep
until support is available.

Task-number: QTCREATORBUG-29971
Change-Id: I253210d44c5587d529f1f7082cac3e9a2ead59c1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-28 11:54:28 +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
Jarek Kobus
0f8a057bea Valgrind: Fix stopping the Valgrind process
Fixes: QTCREATORBUG-29948
Change-Id: Idb7f113bee6706283c7fdea66d9f9dfccbd6cdb4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-27 15:18:14 +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
Marcus Tillmanns
f98934ef73 Core: Simplify ActionManager::setOnTriggered
Allows the same functionality as QObject::connect

Change-Id: I4416d991dc8bcdf24893435c30b530a6b4d3fda4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-27 14:27:53 +00:00
Jarek Kobus
b26d7b0f48 RemoteLinux: Preserve TransferMethod setting
Change-Id: I265831c4a552caa258417952bd418a284734fd4b
Reviewed-by: hjk <hjk@qt.io>
2023-11-27 14:15:31 +00:00
Marcus Tillmanns
1079204a3e Utils: Fix updating BoolAspect::action() checked state
Task-number: QTCREATORBUG-29949
Change-Id: I1c12bd59855ecf13f06fdb16bf8e0937768527b1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-27 14:06:11 +00:00
hjk
3bbda8f9da ProjectExplorer: Rename Tool{C,c}hainKitAspect
Change-Id: I74460b6402ab00f972c208023f03fac617982a11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 13:35:28 +00:00
Christian Kandeler
ba249a3514 QbsProjectManager: Add a language client
... and use it to follow symbols that QmlJSEditor does not know about.
For now, the only implemented case on the server side is getting to a
product or module via a Depends item.
More functionality will follow.

Change-Id: I597c7ab10f4bf6962684ed26357dfc0eef3a6c15
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-27 13:00:36 +00:00
Christian Kandeler
41ac635ca6 ProjectExplorer: Fix restoring kits data
Another fallout of Utils::Store.

Fixes: QTCREATORBUG-29970
Change-Id: I2b696b83980c451d5312ac8a874d9f3dc86361c9
Reviewed-by: hjk <hjk@qt.io>
2023-11-27 11:51:26 +00:00
The Qt Project
32ed2cb9c7 Merge "Merge remote-tracking branch 'origin/12.0'" 2023-11-27 11:48:19 +00:00
Marcus Tillmanns
2da12ddc60 Terminal: Add select all action
Fixes: QTCREATORBUG-29922
Change-Id: I565f2f9f570610e1bb7f528cd874a0dd9c47dbe8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 11:32:01 +00:00
Eike Ziller
f9fb628ee3 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	src/plugins/cppeditor/cppeditorwidget.cpp

Change-Id: I618826eaea8acfa65148bd191a0263454bf50e43
2023-11-27 11:47:53 +01:00
Tor Arne Vestbø
d7545f9bf5 Prevent lldb from enabling os_log mirroring to stderr
lldb will normally set OS_ACTIVITY_DT_MODE, so that NSLog is mirrored
to stderr, but this also affects os_log, which we use in the Apple
unified logging backend.

When we detect this situation in the unified logging backend, we disable
Qt's own stderr logging, to avoid duplicate messages.

As the Qt stderr logging is preferable to the stderr logging that os_log
gives, we override lldb's choice, using the same environment variable
opt out that Xcode uses: IDE_DISABLED_OS_ACTIVITY_DT_MODE.

This makes console output in Qt Creator the same, regardless of whether
the user is debugging the app or not.

Change-Id: I5544bde803671258cede918705388c9283885e30
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-27 09:58:56 +00:00
Christian Kandeler
61e9a7fe16 CppEditor: Fix comment conversion for indented comments
Due to accidentally overlapping removal/replace operations, it could
happen that we lost actual content when trying to remove whitespace.
Amends f93836b25d.

Change-Id: I7a624e78cf0986ee9818d47ea0812c6632426a24
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 09:57:52 +00:00
Eike Ziller
b76c054961 Widget Designer: Hide the toggle action for the central widget
It doesn't really make sense to toggle the central widget (= form
editor) for widget designer

Change-Id: I6ebcc9e1c2a57f1377c16a791b27b44f081042c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 08:33:28 +00:00
Eike Ziller
7c72952967 FancyMainWindow: Improve positioning of docks when (un)collapsing
This is not foolproof, but we try to find the dock widgets that are
vertically arranged with the one that is (un)collapsed, and try to set
the sizes such that the title widget does not move.

Change-Id: I14fd799396a41420b041a89d43fd65d47672a831
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-27 08:33:20 +00:00
Eike Ziller
22f5ec4c87 Widget Designer: Adapt after dock widget redesign
Before the redesign, the dock widgets didn't have a "tool bar" at the
top, so we had the designer tool bar with the document dropdown and form
related tool buttons spanning the whole design mode width (to have a
continuous styled bar at the top of the window).

Now the dock widgets' title widget is a styled bar, so we would have the
designer tool bar, and below that the styled bar from the dock widgets,
which unnecessarily creates a big blog of styled bars.

Instead, move the designer tool bar inside the central form widget. The
title bars from the dock widgets complete the top styled bar now. This
is also more consistent with Edit mode.

Change-Id: I7d322a75a8a34120763b4dd85c44ddf674930e36
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-27 08:32:26 +00:00
Ali Kianian
24968dbabd QmlDesigner: Update DataStore.qml when collections change
Task-number: QDS-11113
Change-Id: I27d49d40a36a22e9af447087e7e8f7995812f1e3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-11-24 20:14:54 +00:00
Tim Jenssen
f6b5afa8e4 Cmake: DS does not want automatic detection of cmake help file
Task-number: QDS-9780
Change-Id: I006b27ee21a910f6d5095f09406b0f4e95a62c35
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-11-24 17:48:58 +00:00
Aleksei German
37228f6da6 QmlDesigner: Fix Connections for items without ids
Task-number: QDS-7711
Change-Id: Ie686a7a456dd8cee57d63480913cd6f636af3e91
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-24 17:21:16 +00:00
Henning Gruendl
e16a302a43 ADS: Integrate newest base repository commits
* Update to newest version of ADS
* Fix memory leak in DockContainerWidget

Base repository was merged until commit
59b4dfb89c0c9c0e6035fe580088432312ed2d09

Change-Id: I357b21888fe6f0ec2160c8688d84cb7ecdcad079
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-11-24 16:16:00 +00:00
Henning Gruendl
d0fccdc025 QmlDesigner: Fix signal name prefix removal
Only remove the first to characters of a signal name, if it matches
the regular expression.

Task-number: QDS-11385
Change-Id: Icc61f2c5281c15842729f67d3b0498c80637ceb1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
2023-11-24 16:14:12 +00:00
hjk
c28fb1fdbe ProjectExplorer: Rename ToolChain to Toolchain
Change-Id: Ibb520f14ff3e2a6147ca5d419b9351c50c141063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 15:18:24 +00:00
hjk
2d4867e73f ProjectExplorer: Rename Tool{C,h}ainFactory
Also adapt derived classes.

Change-Id: Iebf654c974730333c42b6994269ad1a4d5f7f428
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 13:55:25 +00:00
Eike Ziller
39b0989050 Sqlite: Fix missing include file in dev package
sqliteexception.h:6:10: fatal error: sqlite3_fwd.h: No such file or directory

Amends eed303450d

Change-Id: I350246e223bd80129b1fb29e8b2b57953536b5c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-24 13:50:12 +00:00
Henning Gruendl
d9671c62d9 ADS: Fix switch enum not handled warning
Change-Id: I7b9dd5f5cf3dde535aa099a9a64203060174123e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-11-24 13:47:26 +00:00
Henning Gruendl
9affb29ddb ADS: Fix FocusHighlighting when dragging tab
Task-number: QDS-11172
Change-Id: Ibb159bb39a3e15797b468302c38531188e928ae9
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-11-24 13:36:35 +00:00
Henning Gruendl
b5da50338e ADS: Prevent saving not displayed workspace
Prevent saving a workspace that was never shown, e.g. only welcome page
was shown and QtDS was closed again. This scenario causes the workspace
to have wrong sizes hence the next time this workspace will be shown
it will look distorted.
This behavior is a result of the startup workspace always being loaded
and always saved. If the workspace was never visually shown, it didn't
get the correct geometry from the main window which results in wrong
sizes of splitters in the workspace.

Change-Id: I780b561e98e72f7d48becf32d178fb600b5d4336
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-11-24 13:36:10 +00:00
Henning Gruendl
66bda77d43 QmlDesigner: Make minimumSizeHint setting passive
Remove the connection to the minimum size hint setting and the active
call to the dock manager and force the user to restart design studio to
apply changes.

Change-Id: I2aca66b02a1f7658a2dac7322f6a530bf9f6b084
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-24 13:35:57 +00:00
Christian Kandeler
badc0b4ea5 CPlusPlus: Fix parser crash
The parseCompoundStatement() function can return without setting the
output parameter if the maximum statement depth is exceeded.

Task-number: QTCREATORBUG-29847
Change-Id: Ifd76cd948c30498863246a1b80bd0657950101ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-24 13:30:43 +00:00
hjk
2ef1ed9c22 ProjectExplorer: Rename Tool{C,c}hainConfigWidget
That's the trend.

Change-Id: I24a328f1190200b4499c6a11d9d3df074ce5973d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 13:17:42 +00:00