Commit Graph

1462 Commits

Author SHA1 Message Date
hjk
d0cad6fff3 Debugger: Attach Context(CC::C_EDITORMANAGER) in main widget constructor
... when it is created, but don't force widget creation to be
able to attach the context.

Change-Id: I62a7610241e68d658f2b31fb98666d94fe6061d7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-18 11:33:29 +00:00
hjk
1c17370146 Core: Add a way to delay-construct mode widgets
... and use it for edit mode.

There's currently no real effect as the mode bar population in
ModeManagerPrivate::extensionsInitializedHelper() accesses all
IMode::widget() and triggers the creation, but in principle we
could pass the functor instead of the widget down to and store in
FancyTabWidget and only use it when a mode gets activated.

Change-Id: I4c4a276bc025abce1ff47c68b060c67b5c8e5170
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-07-10 13:19:17 +00:00
hjk
317a985dd6 Debugger: Create separate class DebuggerModeWidget for mode widget
Change-Id: Iaf8d2f2b9bfaf80f2b3b231638c1609503f7850f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-10 09:29:24 +00:00
Eike Ziller
e1560a3c7c Make mode hiding and style available from mode selector
Add the View > Modes menu as a context menu to the mode selector in the
emtpy areas. Add a context menu with "Hide" and the mode style to the
modes that don't have a menu, and extend existing mode menus (Debug
mode) with these items too.

Change-Id: I28106d9b6c4f0d69b2d06c4ec9664eb67e2b1216
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-07-10 06:06:41 +00:00
hjk
2c40765e86 Core: Add a static IContext::attach() function
... to simplify the user code.

Some, but not all, potential beneficiaries are adapted.

Change-Id: Ia7d514a0114a4f99f8ee745523435f5b990bd095
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-04 10:09:53 +00:00
Cristian Adam
dcaa55200b Debugger: Add "LLDB Dap" preset
lldb has a dap interface since a while now. The "GDB Dap" preset is not
compatible, since gdb uses the same executable and lldb has a "lldb-dap"
(previously "lldb-vscode") executable.

Change-Id: I4105223659de093f0ee44129527c4830d21a3090
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
2024-06-13 15:02:45 +00:00
hjk
abd538507a ProjectExplorer: Make settings access more direct
A step towards aspectification.

Change-Id: Iabf5e56e993449dc482d1d2ab6eeb2885243ab3e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-04-12 11:48:29 +00:00
hjk
be33c807a6 ProjectExplorer: Remove PEPlugin::finishedInitialization() signal
It was only used once in the debugger, connect more directly there.

Change-Id: I96923a308adfd343daeab6574e097f24bf0654d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2024-02-07 14:23:46 +00:00
hjk
3f224291e6 Debugger: Move plugin tests to extra file pair
Change-Id: I1ce7c9e9b2b680ea8f5a80a3b9556916e7d3d180
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-19 10:29:43 +00:00
hjk
d234e71643 All: More ToolChain->Toolchain renamings
And removal of one unused function declaration.

Change-Id: I594e23401d8f247d3be081ce850005574951899d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-19 10:29:33 +00:00
hjk
68f67d5a1a Debugger: Move plugin class definition to .cpp
Change-Id: I82327b20fb3bd970fe66b43228ca2f014c877f12
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 09:06:08 +00:00
Eike Ziller
10e5a27c27 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp

Change-Id: If96d0f0a3d48c2581e765e4afb8b23924c48bdd6
2023-12-12 10:17:39 +01:00
Eike Ziller
d3c805630a CMake Debugging: Do not build/deploy
Fixes: QTCREATORBUG-30045
Change-Id: I478abaf29462d9413f3285527459a98b1cae899d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-12-11 14:50:17 +00:00
Eike Ziller
dd9f9c799b Support view/hide right side bar in Debug mode
Like it is now supported in Widget Designer, the view/hide action
toggles the corresponding dock widget area. We cannot do that for the
left dock widget area yet, because that action still needs to toggle the
navigation side bar.

To support this, we need to save not only the QMainWindow state for the
debugger perspectives, but the whole FancyMainWindow state including the
information about hidden dock widget areas. Unfortunately the
PerspectiveState was serialized to QVariant without versioning, so
keeping it that way is difficult. Switch saving&restoring of
PerspectiveState to Utils::Store (and keep some compatibility code).

Change-Id: I0035841930c6a574aeb31650a28be9989e2b5741
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-11 08:41:53 +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
Eike Ziller
d2500dc77b FancyMainWindow: Remove auto-hide title bars functionality
This added complexity with the hovering to get the title bars shown, and
discoverability issues with the action in the views menu to show all
title bars, and the issue that some docks then had double titles,
because we wanted some title to be shown even if the title bar is
hidden.

Instead only show the dock control buttons only on hover, which already
removes a lot visual clutter that was the main reason for the
whole exercise.

One issue is that the title is now uselessly repeated for tabbed docks.
Another is that the title bar style is ugly and not very compatible to
what we otherwise have.

Change-Id: Ib093e0a3f2f07ece74b9055015c5523994032c5a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-11-07 13:50:05 +00:00
Artem Sokolovskii
9af8ecd935 DAP: Fix dap engine selection with the translated strings
Change-Id: I051c1f7e9776922a98f7c54676c237c63984050d
Reviewed-by: hjk <hjk@qt.io>
2023-10-04 12:36:00 +00:00
hjk
0eacd0190d All: Remove some unneeded #includes
Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:50:38 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
David Schulz
0b85fc5aa0 ProjectExplorer: reduce the perceived startup time
... by moving restoreKits to the delayed initialize phase.

Change-Id: If72e41b64ee71f2917b3f7a317d9887afc6e29e8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-09-15 13:08:49 +00:00
Artem Sokolovskii
cecf577dc4 DAP: Add Python debugging
Added Python support to the DAP engine in Qt Creator.

Note:
Locals aren't displayed for python. It will be fixed
in the following commit.

Change-Id: I6d3b41fecc98b92951ed0522e9201401293034d7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-08-31 08:06:03 +00:00
hjk
c7710acadd Utils: Use Key more widely in QtcSettings
And adapt user code.

Change-Id: I6efe4ebe6823de4cc862f304a57e041b02c40eac
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-30 07:38:02 +00:00
Jarek Kobus
e4ab99990e DebuggerPlugin: Fix assert on Creator startup
Add toolbar action to the perspective before calling
setToolButtonStyle(), otherwise the m_toolButton isn't
created yet and the assert is triggered.

Amends d304e82e63

Change-Id: Idac207464d8844565c96718ac65a7b820f05d4b7
Reviewed-by: hjk <hjk@qt.io>
2023-08-29 07:42:59 +00:00
Artem Sokolovskii
d304e82e63 DAP: Add engine chooser
The Engine Chooser empowers users to select the desired
debugging engine when initiating DAP debugging sessions.

Change-Id: I070ff2620b318494ee715c5ac369765d4a9dc616
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-28 15:29:42 +00:00
Artem Sokolovskii
3cdfdf1dd2 DAP: Fix several breakpoints windows during CMake debug
- Added breakpointManagerWindow and engineManagerWindow for
CMake debug mode
- Made CMake debug feature enable by default

Change-Id: I48fd62d8d63e991f31b245438ad8e7706552de32
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 12:33:58 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
a3b93481da Debugger: Hide KitAspectFactory
Change-Id: If98f4598efb273852a602a9ed7379341a3720a60
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:27:10 +00:00
Artem Sokolovskii
3ab2da691d DAP: Add check that cmake 3.27 or higher
If CMake version is lower then 3.27
- Shows the warning in general message
- Starts CMake without debugging
- Stops debugging correctly

Change-Id: Ibb13555c20ae2961c0a3c2ef6ec0fcc25930dddc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-14 13:41:39 +00:00
Artem Sokolovskii
8b1047aa8f DAP: Refactor dap responses handling
Change-Id: Iebc16d7e497b4f3a1deec6f52f7b89815c2cde3b
Reviewed-by: hjk <hjk@qt.io>
2023-08-14 09:58:11 +00:00
hjk
0a3aad0093 Debugger: Name KitAspect related classes more similar to their bases
Change-Id: I2f18f382ccedfde343c72f8a9562f900faa43756
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-08-10 13:03:27 +00:00
hjk
cf0cf0fa9b Debugger: Make DebuggerItemManager a namespace
It had only static functions left.

Change-Id: If0c76373a8428ae7015017b4644e3f974e14a36e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-10 07:52:58 +00:00
hjk
9f1c99cb98 Debugger: Call DebuggerItemManager::restoreDebuggers() more directly
Change-Id: I77a293a8754e2aa3dd521e0810006c5f10ae23ff
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-09 08:59:28 +00:00
hjk
323e94c2fa Debugger: Use AspectContainer directly for L&E settings page layout
Change-Id: I538362541e67499ee1a93fbd5452bdd76694f87b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-27 06:05:32 +00:00
hjk
5d67ad37cf Debugger: Simplify code path leading to .writeSettings()
Change-Id: Iaea1159305507e10adf2b448a774e2b528eaef80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-24 08:16:39 +00:00
hjk
ece7ae6bb5 Debugger: Avoid now unusual external trigger of readSettings()
Change-Id: I5a3c9f07e7b07184916b5ca3b95a8966c62193eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-21 10:35:27 +00:00
hjk
11e1c7b1a4 Debugger: Move CommonOptionsPage to new settings scheme
Change-Id: I851931d3b0536659dc2e53a67b9879caad2f3166
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-20 13:47:24 +00:00
Artem Sokolovskii
4a0a6f07e7 DAP: Fix start CMake debug mode
Change-Id: I2951142736b0e6ccf2b08a7bd78b08b1e96bca6f
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 09:46:20 +00:00
Artem Sokolovskii
cd6e990de8 DAP: Add CMake debug to the debug panel
This commit introduces the capability to initiate
CMake Debug sessions directly from the debug panel
in the QtCretor.

Change-Id: I00245e0e14aded378e881c4049cdc41dd1fbd00e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 08:47:01 +00:00
hjk
a5e773aeee Debugger: Adapt to latest settings access style
Change-Id: I14f737612b4fe6a37e650190b587ef0b04e559ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-14 08:39:08 +00:00
Eike Ziller
77c7e26779 Tasks: Show tool tips with information about the categories
When hovering an entry in the filter menu in the Issues view.
Also remove some categories that shouldn't be there.

Change-Id: Ifb367d69b9396c2fdc45b83ec5ffd88ac2f0eda7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-13 06:09:27 +00:00
Eike Ziller
cd1b6a669b Tasks: Create a container class for category data
Reduce the number of arguments that need to be passed around.

Change-Id: I9fbfdcdf7b20f8f26e35f435bf8d65ba483e4114
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-12 06:34:25 +00:00
Jarek Kobus
9f1b56e91a ProjectExplorerPlugin: Use expected_str for canRunStartupProject()
Change-Id: Iddc9abcb1b9ef02c6a8188d2eb82cc30a0ba4c22
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-07-07 08:23:29 +00:00
Artem Sokolovskii
1fc0ca5277 DAP: Add CMake support to DAP engine
Added CMake support to the DAP engine in Qt Creator.
This feature can be enabled by setting the environment
variable QTC_USE_CMAKE_DEBUGGER. CMake debug session can
be started by clicking "Run CMake" or "Run".

Note:
Doesn't work with "Run debugging" in this patch.
Works only with cmake 3.27.0 and newer.

Change-Id: I756ea57f507aa4a6621ad62a8c0ef52c44a5185d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-05 06:59:49 +00:00
Eike Ziller
dff9e1463b Reduce usage of app_version header
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.

This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.

Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-26 06:57:46 +00:00
hjk
0cf1477324 Debugger: Split out gdb related options into own page object
Goal is to make option setup more similar to the other "simple" pages.
The GdbOptionPage is now separated in the setup code, but aggregated
into the old place and accessed there.

The per-backend separation seem quite weak, a full split would currently
need to have include gdb/* in several places now is an indication
that the gdb/non-gdb split in the options is dubious at best.

Change-Id: Iad210016739aa4a63645731e16825f546bdd5e8a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-22 15:22:38 +00:00
Jarek Kobus
deb74751fb Various plugins: Reuse QScopeGuard instead of ExecuteOnDestruction
Change-Id: I3341342bc763fade5ad9dcb854928e5499287472
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-07 10:34:41 +00:00
hjk
0d4a546397 Debugger: Use Utils::Text::Position instead of int line number
The column is currently unused.

Change-Id: Iabc57c8d21e807187783071efe9a82e9c1877181
Reviewed-by: hjk <hjk@qt.io>
2023-06-07 07:36:29 +00:00
Eike Ziller
ee6789c523 Centralize a PluginManager::isShuttingDown() status
Instead of keeping track of this in plugins individually.

Change-Id: Ia2650f0f647d4a63d2010cef688aa56f6020c338
Reviewed-by: hjk <hjk@qt.io>
2023-05-23 07:19:42 +00:00
hjk
d740a355bb Utils: Rework CheckableMessageBox
Remove function overloads, thes are hard to read, to use and to extend.
I'd even argue this should be a plain default ctor and a few setters +
exec(), pretty much like Process::start() nowadays.

Move "decider" magic into a structure that can be filled ad-hoc outside
checkablemessagebox.cpp paving the ground for:

...removing  aspect dependency from CheckableMessageBox, Instead, add a
convenience function to BoolAspect.  Arguably, the latter is not needed
and could be done on the user side.

Use pointers instead of mutable references for in-out parameter.
Makes the "specialness" visible on the user side.

Pass ICore::settings() centrally as done elsewhere to reduce line noise
on the user side.

Change-Id: Ibb366353d1ea35401723fd05ce05672617a0a8fd
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-05-22 06:40:13 +00:00
Marcus Tillmanns
1fc2459b62 Utils: Unify CheckableMessageBox and make it look more native
Change-Id: I5690c16f38cfd2058e01441283bec28d44cadf75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-17 08:01:13 +00:00