Commit Graph

1433 Commits

Author SHA1 Message Date
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
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
hjk
b4f665f8ac Debugger: Use new plugin test object setup
Change-Id: Ic97dfd9aa22c4c8e41f81478983fb79760a76807
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-14 13:29:30 +00:00
Alessandro Portale
226799858c Translations: Replace QCoreApplication::translate() with Tr::tr()
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.

Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:37 +00:00
Alessandro Portale
64aaf66c3b Proliferate Tr::tr in various places
This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.

Found with regular expression: (?<!(Tr::)|([\w]))tr\(

Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:19 +00:00
Marcus Tillmanns
96ebe93ecb Debugger: Rebuild AttachCoreDialog
The old dialog was based on local vs. remote file paths.
These days we can simply treat them the same.

If the selected files are not on the same device as the
debuggger they will be copied first.

Change-Id: If5ec93d1e1e49c51b3032fec8384682d2a5e35b4
Reviewed-by: hjk <hjk@qt.io>
2023-02-07 12:31:40 +00:00
Jarek Kobus
9438575beb ProjectExplorer: Move settings structures out of Internal namespace
There is a public exported API that returns these structures,
and different plugins use it, so there is not point in keeping
them inside Internal namespace.

Remove some unused includes.

Change-Id: Ia9d3fc83738c38ae37f04ae0f518ec5d972c9d85
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 15:06:19 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +00:00
hjk
33cdb052ba FilePathify some testing code
Change-Id: I3739a6eb3c2172078e9519e8186daf94ec74d99a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-13 10:46:13 +00:00
hjk
66c08a824d Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settings
Specifies the main purpose more clearly. The remaining ones a "true"
(internal) variants in models and as action data.

Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 09:00:30 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
hjk
15d6e1df1b Debugger: Use a full class for DebuggerRunWorkerFactory
This continues the work started with de6c7696d2.

Change-Id: Ifc306347f2346909a9eba39c74449c559a7c2f76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-06 07:16:17 +00:00
hjk
0bc9d493aa Debugger: Move backend-specific option pages to the end
<generic> <gdb> <cdb> <generic>  was an odd order.

Change-Id: Ic3a998e4753118c26250f9e4c764495c70b870f7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-20 11:58:22 +00:00
hjk
4159c4b5d5 CppEditor: More migration to FilePath
Change-Id: I261b713671e00bb567f61b4ee5ecf6fa83473bff
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-14 09:14:12 +00:00
Jarek Kobus
fc6b7996b8 Debugger: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I5df67cf01e497ad39c070a3f138a647762f2c33c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-09 11:36:09 +00:00
Jarek Kobus
3caf82f746 Remove unused includes of Q[H/V]BoxLayout
Change-Id: Ia90b30b634281414268e00722771470f1e7b69c0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:06 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Marcus Tillmanns
e9045c4962 Debugger: Delay restoration until Devices are restored
Change-Id: Ib3f63e84959518cd629cb98e3e348aea50979927
Reviewed-by: hjk <hjk@qt.io>
2022-09-27 08:35:58 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Jarek Kobus
8cb867670b Drop Qt5: Debugger: Remove code below Qt 6.0.0
Change-Id: I6ccc87465e7bac13268b426070544ca84e0616b2
Reviewed-by: hjk <hjk@qt.io>
2022-07-25 18:20:39 +00:00
hjk
9894c6eaf0 Debugger: Convert to Tr::tr
Change-Id: I5d2475c790851c68f9997ac6af72b5eaca58482d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-08 12:32:38 +00:00
David Schulz
601cb16893 Debugger: set the inferior executable when attaching to a run control
The inferior is used to verify that the bitness of the selected debugger
matches the inferior bitness on windows.

Change-Id: Ide7703a1ecc63a7d69101df779ce7f2660fecdbc
Reviewed-by: hjk <hjk@qt.io>
2022-06-15 04:37:03 +00:00
hjk
fc7634d730 Debugger: Remove DebuggerRunTool::setInferiorDevice()
Handled by the device implicit in FilePath nowadays.

Change-Id: I45b0e1b03de486df678e239143e2bdd995bee380
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-30 10:17:10 +00:00
Jarek Kobus
9db911ae12 Get rid of Ssh lib
Move the rest to ProjectExplorer plugin.

Change-Id: Id2f022359e7e01728779228ea1f7f0b05a81c8e4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-23 18:21:28 +00:00
Jarek Kobus
87f3e7563c Ssh: Rename SshConnectionParameters into SshParameters
Move it to its own header.
Get rid of SshConnection and SshConnectionManager,
as they are not used anymore.

Change-Id: I52fe20d7816ea57e7a7158ab2ae9565d50a76e21
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-23 12:03:39 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Thomas Hartmann
5e31fae6d9 Hide Debug/Build side bar action if menu is disabled
Change-Id: I8c7a2e5f0bb76e74692c6b4463aa1feb806d6e49
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-05-17 15:11:33 +00:00
Eike Ziller
3784f69c9e Debugger: Fix compiler warnings
Remove unused lambda captures

Change-Id: Ibe3cc4477442ea77a86045666b629fee8f27d084
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>
2022-05-12 07:15:08 +00:00
hjk
a579fa52ee ProjectExplorer: Rename some RunControl functions
Change-Id: Ia86a50100ddfd465d548863ae8d58033a5dbafc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-05-02 08:10:28 +00:00
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00