Commit Graph

415 Commits

Author SHA1 Message Date
Marcus Tillmanns
20904b2411 Debugger: Dont show invalid hit count
The CDB Engine cannot report the hit count.
Instead of showing "0", we don't show the hit count
at all.

Task-number: QTCREATORBUG-20069
Change-Id: Ie8b5478ba85c7255b13070cb488599a2b2ca4537
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-01 07:14:43 +00:00
Artem Sokolovskii
3bf61cc36c DAP: Move to a unified way to handle breakpoints
Rely on SetBreakpoints response instead of breakpoint event.

Change-Id: Iff052a13c442fb1fcd945cf1a80f1354c43c15c5
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:34:56 +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
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
Marcus Tillmanns
d7a26911e4 Debugger: Use the pathUsage parameter
Previously the "Path:" option for breakpoints was ignored
by the lldb engine.

Change-Id: I3878ff7b50da994b26b9c42483e4640adc5c60cc
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-09 09:29:39 +00:00
Marcus Tillmanns
2d128e9c70 Debugger: Fix BreakpointItem::needsChange
Change-Id: I75680eddb7a6c2ba23148b66cf8dfcc08b07eca2
Reviewed-by: hjk <hjk@qt.io>
2023-06-07 07:50:25 +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
edd1a89807 Move SessionManager to Core plugin
Sessions are independent from projects, and this allows for removal of
e.g. the dependency from Bookmarks to ProjectExplorer.

Includes moving the command line arguments (-lastsession, <session>) to
Core plugin.

Change-Id: I6c578fd15c4990902e7196501de20f39376e90e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-25 11:15:41 +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
0dc61f55c3 Debugger: Use more FilePath in source file handling
Needed for the double-remote case.

With this we have proper breakpoint markers in the text editor for a remotely
running gdb on a remotely loaded project.

Change-Id: If80e4a4108a4a0bcdd7612a59e2bd695213f5ea5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-03-15 12:34:58 +00:00
hjk
3f8240a7de TextEditor: Some fileName -> filePath renaming
Change-Id: Id0751f936666fa658226d62a1906b82e3bac1660
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-08 13:48:30 +00:00
David Schulz
baa1e3c2e1 Editor: Allow to hide annotations for a group of text marks
The hiding is not persistent, so on the next Qt Creator start all
annotations are visible again. This is meant to quickly get rid of
annotations if there are to many irrelevant of a specific kind.

Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-12 10:19:10 +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
e0b856f0b0 Debugger: Remove DebuggerCommand::arg(FilePath)
It's better when the user code has to be explicit in what
format and/or which parts of the FilePath is needed.

Change-Id: I9d70e073f853a1bbc47c8482ebe77d7c4612b4b7
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-17 14:03:57 +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
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
1b070bcb11 Drop Qt5: Debugger: Get rid of QOverload
Change-Id: Ic62a3173adeffdfa78a47849cf1ceaa4f59b8091
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-20 13:13:21 +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
Jarek Kobus
6cd736fe6c Remove algorithm.h from buildtargetinfo.h
Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 08:38:05 +00:00
Aaron Barany
03a0ed0786 Debugger: Use queued connection for menu actions
Pass the parent calling object to the addAction() functions and use a
queued connection. This prevents the following sequence of events:

1. The menu is dismissed when selecting a menu item.
2. The deletion gets queued via deleteLater().
2. The onTriggered action gets invoked and opens a dialog box.
3. The dialog box triggers the events to be processed.
4. The menu is deleted when processing the events, while still in the
   event function to handle the dismissal.

This only affected the watch menu since the others were leaked. Added
cleanup handlers for the other debugger menus to avoid leaking them.

Task-number: QTCREATORBUG-26989
Change-Id: Ifa2c52d7bea884c55d43fa545e3e2870301e4052
Reviewed-by: hjk <hjk@qt.io>
2022-02-07 20:20:58 +00:00
hjk
f2dea561ba Debugger: Introduce a Ctrl-F9 shortcut to enable/disable breakpoints
Since "toggle" now becomes ambiguous, change "Toggle Breakpoint"
to "Set or Remove Breakpoint" and add a new "Enable or Disable
Breakpoint"

Fixes: QTCREATORBUG-26788
Change-Id: I7902308298570360af202fced90bf44fc1a59adb
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-01-04 06:14:16 +00:00
hjk
704b0af8db Replace some PathChooser::setFile with setFilePath
Change-Id: I9a135e27d97b6706ea199b60a0b0b28838c77dcc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-13 09:47:56 +00:00
Christian Kandeler
264fa85f50 Fix a number of compiler warnings
Change-Id: I3e71bffb2099d896742a6fca77febe20e2076464
Reviewed-by: hjk <hjk@qt.io>
2021-07-12 15:24:59 +00:00
David Schulz
5544fd35c4 remove some unneeded FilePath::toFileInfo
Change-Id: I6e6e5906d8c2ca972e98733d06d40fddc68865de
Reviewed-by: hjk <hjk@qt.io>
2021-06-04 04:20:59 +00:00
hjk
76db1e3746 Core: Add FilePath based overloads to EditorManager::openEditor{,at}
Part of the overall FilePath migration. Keep the original version for
a while to allow using code to catch up.

Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 09:55:50 +00:00
hjk
93a5803956 Debugger: Aspectify settings
Change-Id: I527be79965250b82a0928171b17aa93bac9fa2a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-03-03 07:39:17 +00:00
Mattias Johansson
2081038953 Add gdb tracepoint support for Linux
Change-Id: Id2e46bae576a730f8c1b64a247aeed12e6d721af
Reviewed-by: hjk <hjk@qt.io>
2021-02-02 07:36:07 +00:00
hjk
111cc934fd Debugger: Mark currently hit breakpoint in breakpoint view
Fixes: QTCREATORBUG-6999
Change-Id: I2b080de0096d1e2bc5b348666adcf4797589fe15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-07 12:09:40 +00:00
Michael Weghorn
7cded0af3f Debugger: Fix editing breakpoints via breakpoints view
As the comment for the 'm_parameters' member
in the 'BreakpointItem' class says, that member is
supposed to hold the "Parameters acknowledged by engine",
which the parameters newly set in the dialog are not
yet at this point in time.

Therefore, if a global breakpoint exists, apply the
new parameters there, so they are considered as pending
changes (also returned by 'Breakpoint::requestedParameters')
when 'BreakHandler::requestBreakpointUpdate' is
called a few lines below, and new values get applied
properly.

Task-number: QTCREATORBUG-25035
Change-Id: I8bfd9123785ee911ff180d8311fa2559b55be580
Reviewed-by: hjk <hjk@qt.io>
2020-12-04 09:19:47 +00:00
hjk
2bfd515b03 Utils: Allow BaseTreeView users to hide columns manually
... using a context menu on the header views.

Use the feature in the debugger views where it was previously
un-intuitively available as part of the main context menu of
the view, but not in the header.

Task-number: QTCREATORBUG-24384
Change-Id: I3f030c3dd8ce35dc91bad921e37d2273bfe548b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-10 14:28:39 +00:00
David Schulz
43b25e6d99 Debugger: Fix breakpoint enabling
Change-Id: I496d0b90dd572d4f4949c98d5abe035edfba8d19
Reviewed-by: hjk <hjk@qt.io>
2020-10-30 09:51:12 +00:00
hjk
fcaa6801cf Utils: Start replacing SavedActions by QAction or Utils::Aspect
First mechanical step here is to derive SavedActions from BaseAspect
instead of QAction.

Change-Id: I2ec95883b825462c1d867f83cc2b3bd2c2732055
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-05 08:46:27 +00:00
hjk
0d6e2454d6 Debugger: Fix enabling/disabling breakpoints
Fixes: QTCREATORBUG-24669
Change-Id: Id468f57df7978aab6b888d3a026c578b172f2f0e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 11:28:32 +00:00
hjk
4327ddf6c5 Debugger: Use new TextMark interface for Breakpoint
Simplifies usage.

Change-Id: I0df50fe703b2b67ead7f2e35b3a3952fa6d91dab
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 13:06:59 +00:00
hjk
aff11855f7 Debugger: Update breakpoint marker tooltip on enable/disable
Change-Id: I5166e58f038afc373a7baae22b85f7d93e25a583
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 07:52:02 +00:00
hjk
d06207d4aa Core: ProcessReaper code cosmetics
- Rename ReaperPrivate to ProcessReapers
- drop the used ProcessReaper::m_futureInterface
- sprinkle some private and final
- remove unnecessary Q_OBJECT
- remove unnecessary #include, fix accidental user

Change-Id: I2787815975dc80cb93db2132bbfe7ce9a74ebd5f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-11 11:49:13 +00:00
hjk
27c3550d44 Debugger: Fix crash when trying to remove all breakpoints of a file
Change-Id: Iea4478804be7b32a2da924e1163c5c4944c6e8a4
Fixes: QTCREATORBUG-24306
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-08-12 07:25:28 +00:00
Christian Kandeler
eb96f9900a Fix clang 10 warnings about unnecessary copies in range loops
Change-Id: I3b57869b5a04528518bc432b76768b01e3f53e81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 13:45:43 +00:00
hjk
4744473555 Debugger: Start breakpoint manipulation syncronously
The original reason for this was gdb's inability to set certain
break point properties in one go (commands and  so parts of the setup are async
anyway, and using only async paths made the overall setup simpler.
The need to tweak some properties asyncronously still remains, but
for the caller side it's better when at least the initial round is
synchronous.

Change-Id: Ibe542533a6026c7f0f4e49f4244b7e9d2aea7062
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-05-07 07:12:57 +00:00
hjk
4ba131bdd6 Debugger: Handle failed breakpoints as unclaimed
Change-Id: I02a44db5391b174e75fc326ce217b271ee73c464
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-24 06:12:35 +00:00
hjk
37b079a19c Debugger: Some FileName cosmetics
Use {from,to}Variant for settings, and one time fromUserInput is enough.

Change-Id: I5774f425a4c775b0d78b87c60eabf7f48d78a082
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-14 12:30:32 +00:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
hjk
79b680e7f0 Utils: Rename PathChooser::{f,setF}ileName() to {f,setF}ilePath()
It's returning a FilePath, so it's a better fit.

Keep the old versions as inline function now to ease downstream migration.

Change-Id: I535887928018f42b92895c8b0c82527f0d55e5ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-04-09 17:30:23 +00:00
Eike Ziller
d80f3972a4 Merge remote-tracking branch 'origin/4.12'
Change-Id: Ia8254720b2ba6e3e7b859017e1c2b6e289bed771
2020-03-20 08:16:19 +01:00
hjk
f2f6452977 Debugger: Fix some breakpoint file name display breakage
For unclaimed breakpoints the wodking directory was shown
as path.

Amends commit a7dd0e50a2.

Change-Id: I9614b3672d32fb18e35dc98c12a60e3b27eebf84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-19 13:39:48 +00:00
Eike Ziller
ed5e6a4999 Add some additional shortcuts for actions
Add Cmd+Shift+- for decreasing font size on macOS.
Do not add Cmd+= for increasing size, because it conflicts with the
existing shortcut for "Replace and Find Next".

Sprinkle some Backspace shortcuts in addition to Delete for removing
items. There are (laptop) keyboards that either do not have a designated
Delete key (requiring Fn+Backspace) or where the Delete key is not
conveniently located/sized, and there is no benefit in making the
distinction in that case anyhow.

Fixes: QTCREATORBUG-706
Fixes: QTCREATORBUG-13733
Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-03-17 09:39:37 +00:00
Kai Koehne
fda9955df0 Globally disable WindowContextHelpButtonHint
Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 13:26:44 +00:00
David Schulz
7792d82bd9 Debugger: Do not highlight global breakpoints in scrollbar
The color red is perceived as an error indicator. So only highlight
breakpoints if they have been assigned to an engine to reduce the visual
distraction.

Fixes: QTCREATORBUG-23433
Change-Id: I852d94a7637c958c65c94acacc8233b6553bb612
Reviewed-by: hjk <hjk@qt.io>
2020-01-09 05:36:38 +00:00