Commit Graph

1357 Commits

Author SHA1 Message Date
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
Eike Ziller
2a70bc1d09 Debugger: Fix build with Qt6
QStringRef gone.
ViewOptions changed.
MetaType register stream operators automatically.

Task-number: QTCREATORBUG-24098
Change-Id: Ibf98561af951aa5fc4ec483d18dafeaad02e07c3
Reviewed-by: hjk <hjk@qt.io>
2020-09-18 14:41:20 +00:00
Orgad Shaneh
8951ddfd62 Debugger: Support sysroot override
Sometimes the same toolchain can be used with different versions of
sysroots. Support this in command-line and dialogs.

Change-Id: Id49f8e8c50f4856e979eecbbdebc680b57dc69b2
Reviewed-by: hjk <hjk@qt.io>
2020-07-06 16:04:49 +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
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00: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
hjk
df7400b686 ProjectExplorer: Disentangle ProjectExplorer::updateRunActions
This enforces a linear pass through

  [static] ProjectExplorerPlugin::updateRunActions
  ProjectExplorerPluginPrivate::doUpdateRunAction
  [emit] ProjectExplorerPluginPrivate::runActionsUpdated

instead of the previous direct emission of the signal from
user code and connecting also the internal update to it.

This is meant to simplify reasoning about execution order and
maybe to help elimimating double executation.

Change-Id: Id8cc41a46d9dec06afb5514855f2ae80560f3695
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-02-26 14:32:58 +00:00
hjk
06b2023420 Debugger: Remove "IdentifyDebugInfoPackages" feature
This was only ever working with SuSE and GDB, and nobody
ever tests it, nor asks for extension to other setups.

Change-Id: I7b1e3cc8c9f71df4c86b957a79d5afe02eec0758
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 14:13:01 +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
hjk
299d34d547 Remove apparently unneeded QtPlugin includes
Change-Id: I511c0318a72dbf2a92e4749dee02eabfc9826139
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-12 16:03:37 +00:00
Eike Ziller
d43f1662d0 Make TextEditor setup more flexible
So far it was only possible to combine TextEditorFactory, BaseTextEditor
and TextEditorWidget directly.
That TextEditorWidget is also directly a QPlainTextEdit made it
impossible to "decorate" the text editor widget with something else
without a lot of effort.

Make it possible to create a text editor factory that returns an
arbitrary widget, as long as it can be "cast" to a TextEditorWidget with
either qobject_cast or Aggregation::query. That way the TextEditorWidget
instance can be attached to the editor widget via Aggregation.

Adapt other code that accesses TextEditorWidget from editors
accordingly. Introduce a common method how to do that.

Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-02-12 10:28:31 +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
hjk
5496d7cbde Debugger: Use new IOptionPage convenience for global options
Change-Id: I42391a01027f25be638b2d1b839d3038bced5f33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-09 12:45:48 +00:00
David Schulz
a7dd0e50a2 Debugger: make BreakpointParameters::fileName a Utils::FilePath
Task-number: QTCREATORBUG-23339
Change-Id: Ifc497c14589cd6df10d8219533e100f1919213b3
Reviewed-by: hjk <hjk@qt.io>
2020-01-06 13:29:44 +00:00
Christian Kandeler
5cebf2a79a ProjectExplorer: Move some build-related code to BuildManager
The projectexplorer.cpp file is a huge mixed bag, which could use some
cleaning up. The queue() function is very much related to the
BuildManager, so move it there.

Change-Id: Ibc6425cc27d44514803a5e7c6139f83ddd760382
Reviewed-by: hjk <hjk@qt.io>
2019-12-19 17:35:46 +00:00
hjk
466764146c Debugger: Rename some GdbServer* to DebugServer*
This is mimicking a bit what has been done on the baremetal side,
and is formally more correct when the gdbserver is not a real
gdbserver, but e.g. a probe speaking the gdb remote protocol.

Change-Id: I1b42624b94071b34c009bd0650095792a5b2fcb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-17 08:23:06 +00:00
hjk
4bd26c3e4b Debugger: Add ability to hide view columns
Not perfect, e.g. one would probably expect the items to
appear in the context menu of the header views, too, not
just on the main background of the view, but better than
nothing.

Task-number: QTCREATORBUG-23342
Change-Id: Ifdc44dcfd390112faa7b15bb8a51d809e42d7b29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-12-13 08:07:31 +00:00
hjk
0e49f11ca3 Debugger: Avoid a few clang warnings
Change of signedness and/or size.

Change-Id: I126d36d406afbba4b7383bf8326d845db79cdde7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-12-10 11:43:50 +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
hjk
c8137bdcf9 ProjectExplorer: Consolidate some Session::active* accesses
Change-Id: I47b0f6c2c60b2f7c86b6ffd1ad3df393d1321c8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-29 08:39:07 +00:00
Nikolai Kosjar
202aa06d7c ClangTools/Debugger: Fix resource name clash
The two plugins plugins added resource files which were referenced with
the same name, namely

    :/unit-tests

Make the names unique.

Change-Id: If63e762663f3f61b15f826d76ffcd2eb66873db7
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 16:05:18 +00:00
Christian Stenger
89dbb44fcb Debugger: Prohibit multi selection on debugger presets
To avoid confusion regarding context menu items limit the
selection mode to single selection.

Change-Id: I220d97fee65180a497f21e5921f832076235acb5
Reviewed-by: hjk <hjk@qt.io>
2019-10-18 11:29:27 +00:00
Laurent Montel
f467badc2f Port setMargins to setContentsMargins
Change-Id: Ie6b3f3e4dddbbf4bcc7ea7561ec348ff2c666907
Reviewed-by: hjk <hjk@qt.io>
2019-10-16 05:02:57 +00:00
Orgad Shaneh
0b1e6599c9 Debugger: Fix MSVC warning
Using QObject::connect without capturing 'this'.

Change-Id: I64e61e897760002888d7a11771bd2dc36e640c72
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-07 13:17:34 +00:00
hjk
a82b40e037 Debugger: Move convenience function to only user
Change-Id: I50952521bdd45faa8a31da674e7ea5f0796d75d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-25 08:06:03 +00:00
hjk
b63034b551 Debugger: Move showModule{Sections,Symbols} to DebuggerEngine
A bit closer to where the functions are used. No real change.

Change-Id: Icbad68bd31d85caa59980316537ee532faf2d7ef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-25 08:05:51 +00:00
hjk
d43409ea67 Debugger: Shuffle plugin setup code around
To get closer to the standard setup.

Change-Id: I969abb44393532f5dba95e643bd8ba6356f44d16
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-23 07:31:04 +00:00
hjk
7b0a5e44d3 Debugger: Inline rarely used convienience function
Change-Id: Iad5db32af9adb90f5d191e4fdcd2be751bd2b412
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-09-20 13:39:31 +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
hjk
e51059c515 Debugger: Reduce scope of explicit use of perspective windows
Maybe these can be created lazily later.

Change-Id: I1ebcbd99b2149e96197bbff7f7c877f609e126ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-18 14:08:57 +00:00
hjk
4028a41d2e ProjectExplorer: Use std::function for SimpleTargetRunner::start()
This spares us the typical r = runnable(); modify(r); setRunnable(r)
roundtrip and the m_runnable storage that might or might not
be the same as runControl->runnable. Similar for m_device.

Change-Id: I8300260dd8dd7cd395e40bcd3d2ae45089085008
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-04 11:08:34 +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
f9c221eb54 ProjectExplorer: Re-work setup runworker factories
This combines two of the previous three paths to create run workers,
and refers to RunConfigurations by id, not by type where possible
to decrease coupling between the classes.

Only allow "type of run configuration" and "type of device"
as the only possible kind of restriction and require a uniform
RunWorker constructor signature.

Adapt user code to fit that pattern.

Change-Id: I5a6d49c9a144785fd0235d7586f244b56f67b366
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-08-09 12:34:42 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
Eike Ziller
10098b2508 Merge remote-tracking branch 'origin/4.10'
Conflicts:
	CMakeLists.txt
	tests/unit/unittest/unittest.pro

Change-Id: I64296ad31502d9b35012da129a28e9277e9fcf8e
2019-06-28 12:50:03 +02:00
Christian Stenger
d54d1c34b8 Debugger: Set tab title when attaching to started application
This amends 75b501be9d.

Change-Id: I186b276b82ac5793c58be9d37c36c9d49dda1edd
Reviewed-by: hjk <hjk@qt.io>
2019-06-25 05:37:13 +00:00
hjk
1396c6e8e9 ProjectExplorer: Use Utils::FileName for Runnable::executable
Change-Id: I584bc18aa19a4c9886af7b13e95052dfd4350b34
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-21 10:32:31 +00:00
hjk
f636f06b45 Debugger: Remove GdbServerPortsGatherer::setDevice
Apparently not used anymore.

Change-Id: Ic9ee826edd383254dcb77ea435843904a53d10a8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-13 14:49:36 +00:00
hjk
fee7e9fbda Debugger: Abandon special DebuggerKitChooser
The regular one with icon display is good enough nowadays.

Change-Id: I9a511c9975ceaeae0bb8005ac647fa710bf9d900
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-12 07:00:13 +00:00
Christian Stenger
75b501be9d Debugger: Revive long lost tab titles
Tab titles of the application output pane for attach
to running and unstarted applications had been present
a long time ago.

Change-Id: I0a4f18438bef967ad60c447c81d58fec6aa830ae
Reviewed-by: hjk <hjk@qt.io>
2019-05-29 11:23:25 +00:00
Christian Stenger
5261892fc5 Debugger: Avoid having an empty tab title when attaching to core
Change-Id: I7327ef6f350fbff3c1beffe51c65d7ce708caae0
Reviewed-by: hjk <hjk@qt.io>
2019-05-29 11:23:11 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Eike Ziller
e0b0a08e50 ExtensionSystem: Move away from QList
Qt 6 API will move away from it.
Use QVector for API and some std container for internal things.

Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 14:21:00 +00:00
hjk
2ac89cba92 ProjectExplorer: Use an alias for QList<Abi>
Change-Id: I69231c5974620ae30296bfc4e0ab41c900d95a3c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-27 09:35:53 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
Eike Ziller
631e2ea3e4 Force double-click activation for breakpoints view
Since it also is used much for managing the breakpoints, i.e. selecting
and deleting with the delete key, and then single-click activation is
annoying since it moves the focus to the editor.

Change-Id: Ic05ec525f146e2363c4984095b9792973caa1ac6
Reviewed-by: hjk <hjk@qt.io>
2019-05-03 09:41:41 +00:00
hjk
84055b6315 Debugger: Remove unused variables
Change-Id: I404c6803bdc227e29a53db5a6f8fd3e0df5d0b06
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-24 07:07:28 +00:00
hjk
384ca4bdb8 Debugger: Fix "Attach to running process"
Change-Id: I3cef08621c40c87f52e20a229ab5e16f0bfa8bb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-04-09 08:28:42 +00:00
Orgad Shaneh
39ba01da71 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7d1912cd5c4d824fd40d3454c5f1bb796f2c21d8
2019-04-07 23:13:17 +03:00