Commit Graph

235 Commits

Author SHA1 Message Date
Tasuku Suzuki
093739485e Fix 1px vertical scroll by wheel on the debugger toolbar
The toolbar is wrapped around QScrollArea.
Because the height of toolbar (=25px) is 1px bigger than the height of
the scroll area (=24px), widgets on the toolbar move up/down 1px by
mouse wheel.

Fixes: QTCREATORBUG-28107
Change-Id: I83dc9c6d7b0916f31d5f0f15f310be3b0d149bec
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-08 12:27:36 +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
hjk
898210f0a1 Debugger: Fix passing tooltips from to toolbuttons
Visible in the O and <> buttons of the Callgrind toolbar.

Change-Id: I1016f853335bfc243f7e934e7a0cd430922c8af6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-17 08:54:42 +00:00
hjk
5168af3144 Debugger: Always switch on central widget when entering debug mode
This is not exactly what the linked task complained about, but
solves the issue. Disabling the central editor is rarely useful
(it can be limited to three lines in height) but still temporarily
possible with this patch.

Task-number: QTCREATORBUG-25315
Change-Id: I18182e11d7d3e2167a24a340ab1ae7222009b8c9
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-15 13:25:16 +00:00
hjk
ade5b44297 Debugger: Show central widget by default when resetting view layout
Fixes: QTCREATORBUG-25314
Change-Id: Id827c71159b4d23de2ab5adf14521c758f8489ef
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-15 13:25:10 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Eike Ziller
6514e1b866 Fix lupdate issues
Change-Id: I1971f74a54e4afe2d106c105f6b38f415bef488f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-09 14:55:56 +00:00
Christian Kandeler
659771f09b Debugger: Provide keyboard shortcuts for "next" and "previous"
... to applicable analyzers.
Rather than inventing separate shortcut categories for all the
analyzers, we make use of the fact that only one analyzer view is active
at any given time, and make them use the same shortcuts for consistency.

Fixes: QTCREATORBUG-20659
Change-Id: Ifa60080def0e6b32395854cff588ab3af9ea33b9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-10-30 12:20:58 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Eike Ziller
0eefc5b70d Add a menu to Debug mode that switches perspectives
Set a menu for switching perspectives on the debug mode icon. When icons
& text are shown for the modes, there is an additional arrow to the
right of the mode that can be clicked to open the menu. This
functionality was added in 4.1 for that purpose, finally use it.
Do not show and arrow in "Icons Only" mode, so it stays small, but make
it available on right-click as well.

Change-Id: If19877b5231b7f01f0b3fd98cf65e8eaf9da1a5f
Reviewed-by: hjk <hjk@qt.io>
2020-06-17 06:48:17 +00:00
Christian Kandeler
02785342ac Fix some clang warnings about unused lambda captures
There are more, but we need to keep those because MSVC believes they are
required. This is the subset that satisifies both compilers.

Change-Id: I0b0a63d5496acc119a7f0513d3a1da0b76fa1fca
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-04-24 08:44:58 +00:00
Christian Kandeler
6ad4cf4695 Debugger: Remove unused variable
Change-Id: Ib6e2c2078ff655ca2ca7c841e5f6415f0d63ef6c
Reviewed-by: hjk <hjk@qt.io>
2020-04-23 10:41:28 +00:00
Eike Ziller
10114dc036 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/android/androidmanifesteditorwidget.cpp

Change-Id: I8143d9e02837dcd78a637da7b333a6eeebb105cb
2020-04-07 11:13:58 +02:00
Eike Ziller
f8ec649c99 Merge remote-tracking branch 'origin/4.11' into 4.12
Change-Id: I3edd6457620e6c2686e13d1030805294d7d3958f
2020-04-03 15:56:36 +02:00
hjk
699407b4ba Debugger: Create central widget earlier
This ensures the showCentralWidget() call in  restorePersistentSettings()
has something to operate on.

Change-Id: I52e676517cad4e7c3c0e7ca80b8756f937c805a0
Fixes: QTCREATORBUG-23755
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-25 08:51:36 +00:00
Eike Ziller
a6d52a6e28 Move some actions to a "View" menu
A "View" menu seems to be what many users are looking for when they want
to show or hide panes/views, so move corresponding actions there.
Window management / split actions stay in the "Window" menu.

Fixes: QTCREATORBUG-23610
Change-Id: Id683addc681de99abb35697a735fdbc9dc0d00cd
Reviewed-by: hjk <hjk@qt.io>
2020-03-06 14:01:23 +00:00
hjk
c570d6469d Debugger: Move PerspectiveState registration
... to DebuggerPlugin ctor. This fixes a "Variant::load: unknown users
type with name Utils::PerspectiveState" message when the TextEditor
plugin restore the FontSettings.

Change-Id: I8e1ebe562233ff6e9b7bdbfa85680e5acf6c4715
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-11 14:27:19 +00:00
Christian Kandeler
8265d1d710 Debugger: Fix memory leak
Change-Id: I3b9a4e220fe974e4d1bf82ad9f014a4a71a5b6b9
Reviewed-by: hjk <hjk@qt.io>
2020-01-23 12:21:30 +00:00
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
hjk
a1c5ca052b Debugger: Avoid a bogus warning
op.dock can legitimately be valid for 'Raise' operations.

Change-Id: Ic59dbf102302bb3f38da56fb0e8d46f18e26cf8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-13 08:07:06 +00:00
hjk
53a4c6eda0 Debugger: Remember sizes and order of the columns in the debugger views
Task-number: QTCREATORBUG-23341
Change-Id: I405be5361e732eccadebd1f51d90c7a3229a2e5e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-10 08:53:19 +00:00
Christian Kandeler
40f02011b0 Fix some memory leaks
Found by Address Sanitizer.

Change-Id: I989da71e24d737e36a88b83a1f382ce2d67e3307
Reviewed-by: hjk <hjk@qt.io>
2019-10-23 11:49:29 +00:00
Eike Ziller
8263f73a4a Merge remote-tracking branch 'origin/4.10' into 4.11
Change-Id: Iad66b08f8d6d7f14319674ae6bb26cdba43b3bfa
2019-09-26 14:59:33 +02:00
hjk
4323da700a Debugger: Try harder to restore dock widget sizes
This is bit of a hack: The dock widget sizes were actually restored
but when previously non-existing docks were affected, a re-layout
was triggered, resulting in different sizes. This can be avoided
by instantiating all dock first.

Fixes: QTCREATORBUG-22415
Change-Id: I4c0b27f5bab5864e93e303db758d8b909a51a425
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-26 12:06:19 +00:00
hjk
ae9925cdc1 Debugger: Mark docks as default-visible when resetting a perspective
Change-Id: I562a71de04335e8b4d34f90e7df3127fbb01ac5b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-25 13:20:36 +00:00
hjk
d8c78538a6 Debugger: Do not forget perspective layouts on unused perspectives
Amends 5273ef2a8a

Use cases mentioned there should still work.

Fixes: QTCREATORBUG-22938
Fixes: QTCREATORBUG-22286
Change-Id: Ie7bb6b7ea6d05a94cbeeb5b8021dc638548778d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e9c0ba9997)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-23 08:50:36 +00:00
hjk
e9c0ba9997 Debugger: Do not forget perspective layouts on unused perspectives
Amends 5273ef2a8a

Use cases mentioned there should still work.

Fixes: QTCREATORBUG-22938
Fixes: QTCREATORBUG-22286
Change-Id: Ie7bb6b7ea6d05a94cbeeb5b8021dc638548778d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-20 10:09:44 +00:00
hjk
05906c9be9 Debugger: Code cosmetics
Change-Id: I8759b5a16385b6abde9680ad6c46be5b0e2abdfc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-18 14:11:51 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
hjk
9ae2794114 Remove more deprecation warnings
Change-Id: Ie50e41737a4bf7bea41f550df7cc765267e8a144
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-05 12:51:17 +00:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
hjk
c978afb42e Debugger: Use the new hint to determine why settings should be saved
Change-Id: I5f8e2caceaa9769fc99e91bf1e29470fa17320bb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-11 15:56:20 +00:00
hjk
34341ffc30 Debugger: Improve perspective geometry persistence
Setting sizes on dock widgets one-by-one to restore previous
layouts does not work, as each triggers a delayed update taking
other (at that time "wrong" sizes) into account.

So store the layout as a whole, per-perspective.

Task-number: QTCREATORBUG-21669
Change-Id: I854cd175297b4ba1e53b404fcaa20092d216cec0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-04 12:05:10 +00:00
Eike Ziller
75696f9639 Merge remote-tracking branch 'origin/4.9'
Change-Id: I95c56cc9371959f96afde3677fc82481f36f66c8
2019-04-12 14:31:01 +02:00
hjk
810a39c706 Debugger: Prevent crash on destroyed perspective
Change-Id: Id000f1c74c2e614f24df1f50f710e51041fa9c38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-09 11:16:52 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00
hjk
5273ef2a8a Debugger: Re-organize dock widget persisting
Looks like the mainwindow cannot be convinced to handle multiple
sets of dockwidgets.

So switch back to a single set containing everything and keep
track of non-default visibility in the perspectives, and persist
these sets.

The following pass:

1.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check: Debugger Selected, Break on right, Global log visible

2.

 Start Creator with new settings
 Goto Debug Mode
 Move Break dock widget to right, switch on Global log widget
 Switch to QmlProfiler sub-perspective
 Leave Creator
 Start Creator
 Goto Debug Mode
 Check QmlProfiler selected
 Switch to Debugger sub-perspective
 Check: Debugger Selected, Break on right, Global log visible

3.

 Start Creator with new settings
 Use any C++ test project
 Start debugging / stop at main()  (F10)
 Wait for stop
 Switch to Edit mode
 Switch back to Debug mode
 Check: Only "running" debugger dock widget layout present
  (not the normal + preset at the same time)
 Quit Qt Creator while this debugger is running
 Check: Shuts down without crash

4.
 Use any C++ test project
 Start debugging
 Switch to Debugger Preset perspective
 Start a second debugger
 Kill either instance
 Check: Application dies, Debugger Preset perspective gets displayed
 Switch to perspective of second instance
 Check: Perspective looks ok (docks visible as before)

Task-number: QTCREATORBUG-21083
Task-number: QTCREATORBUG-21669
Task-number: QTCREATORBUG-21668
Task-number: QTCREATORBUG-21813
Task-number: QTCREATORBUG-21851
Task-number: QTCREATORBUG-22110
Task-number: QTCREATORBUG-22169
Task-number: QTCREATORBUG-22189
Change-Id: Ic9eb41ff7699ac0f48a85e68376daa80b2b6847e
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-05 15:53:51 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
4d5da2938a Debugger: Move perspective saving to a time where mode is active
It should not make and I do not observe a difference, but it seems
the better thing to do.

Change-Id: I1f1f9fba72c2b20f24ebde04cf4ec3711d77d476
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-18 09:56:11 +00:00
Eike Ziller
c53ccceff1 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/debuggerkitinformation.cpp
	src/plugins/languageclient/languageclientmanager.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/kit.cpp
	src/plugins/projectexplorer/kitmanager.cpp

Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
2019-03-14 15:51:15 +01:00
hjk
bc35583099 Debugger: Fix resizing of main perspective switcher combo
In case of debugger sub-perspectives this was effectively operating
on the names of the subperspective, not the "Debugger" string.

Change-Id: Ia5c3ea564b2b1a3ed3291d3cb6bae18e1fb5533f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-07 09:02:08 +00:00
Eike Ziller
0619de8681 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/tools/clangpchmanagerbackend/source/taskscheduler.h

Change-Id: I518adaf647df412887c2a372416634359f09ad2a
2019-03-05 10:22:45 +01:00
hjk
2cad90a559 Debugger: Fix toolbar-oversizing on perspective switch
The true reason for the overshooting is still unknown.

This here works around the issue by wrapping the toolbar
into an additional QScrollArea.

Task-number: QTCREATORBUG-21903
Task-number: QTCREATORBUG-21889
Change-Id: If6e89d138cd3e617e4eaa44227b078f31df1a627
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-01 15:03:11 +00:00
Orgad Shaneh
cbfc6e522d Merge remote-tracking branch 'origin/4.9'
Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
2019-03-01 13:06:57 +02:00
Eike Ziller
eeaa02bc27 Merge remote-tracking branch 'origin/4.8' into 4.9
Conflicts:
	src/plugins/android/androidbuildapkstep.cpp

Change-Id: Id6dfda480c23706089ab38aa6277cd37599b5167
2019-02-28 12:39:09 +01:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Friedemann Kleint
ec6b38dea0 Fix Qt 5.13 deprecation warning about QFontMetrics::width()
Replace by QFontMetrics::horizontalAdvance(), fixing:
warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated:
 Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]

Change-Id: I9991ffefe6e87e872dc35ba291d562e06b28ca64
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-02-15 15:12:02 +00:00
hjk
e8a511f313 Debugger: Change workaround for scrambled dock widget layouts
The workaround from 3d92a79a introduces a bug by itself: When a user moves
all docks off the bottom area, the workaround will trigger as the
condition "nothing below the tool bar" is met.

This here changes the condition to toolbar.width() != mainwindow.width(),
which will trigger in the known scrambled situations (there was always
something to the right of the toolbar), but not in the situation
described above.

Task-number: QTCREATORBUG-21669
Task-number: QTCREATORBUG-21455
Change-Id: Ic2eabbe2ed07352680add4fc5e3b5f6673600479
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-13 12:39:04 +00:00