Commit Graph

1390 Commits

Author SHA1 Message Date
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
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
Alessandro Portale
4ff5157a24 Debugger: Provide a mode-bar sized icon for the "Debugger.Stop" action
That big Icon was always there, but unused. add it to the
"Debugger.Stop" (in addition to the toolbar sized one), so that it looks
good when it appears in the mode bar.

For the "Classic" variant, I needed to add a @2x variant of the non-flat
icon.

Change-Id: Iea7200c7821b3780ff11a17b3ec74c44e06ba8d1
Reviewed-by: hjk <hjk@qt.io>
2019-04-03 14:02:10 +00:00
Eike Ziller
b3baed58c6 Merge remote-tracking branch 'origin/4.9'
Change-Id: If36258b8e572b5c7875433a31a836e4f06e27286
2019-03-21 11:28:21 +01:00
hjk
fb4d8b5a01 ProjectExplorer: Make kit aspects self-register
Also, construct the KitManager implicitly when the first
KitAspect is created. Ramp-down is still explicit and
somewhat odd.

Change-Id: If1506e1d0789ecabbaad2d8008851d0b42c5218b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-18 14:14:28 +00: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
hjk
ceb0fe429d ProjectExplorer: Add RunControl::set{Kit,Target}
For cases where no genuine RunConfiguration is available.

Use it in the debugger for the cases triggered from the menu.

Change-Id: I5671f4f5db2547c4a7a70bd34292bb6ccc8e6bf4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:47:47 +00:00
hjk
efb7d8deb7 ProjectExplorer: Split RunControl constructor
Into a trivial bit and two setters. Plan is to use it only with information
that is truly there (e.g. kit/device only) at the user side without having
to invent a RunConfiguration "handle".

Also remove some dead code in the test runner.

Change-Id: I987881e41722178b14b91f973b84cbdb67a9f85e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-12 16:38:45 +00:00
Orgad Shaneh
cbfc6e522d Merge remote-tracking branch 'origin/4.9'
Change-Id: I801042a53ae4d02d1891ea582ca9ea89b00d3181
2019-03-01 13:06:57 +02:00
hjk
ad606bfe1b Debugger: Show Global Log in top area by default
It's off by default anyway, and in case when one wants to see it
the previous position was not providing enough space.

Change-Id: Ie5c6f56f482a8ca59fd47a534bbae70721313e0b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-22 06:45:49 +00:00
hjk
317ab49793 Debugger: Code cosmetics
Move some constants to internalconstants.h or remove them entirely.

Change-Id: Iecd4def3b48130fb390bddf420da672d44e3d6b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-21 07:56:58 +00:00
Eike Ziller
6d43aaf134 Merge remote-tracking branch 'origin/4.9'
Change-Id: I7bdb6a4658c5fca1a7e1dda5adbb5613dabc6d18
2019-02-19 09:08:53 +01:00
hjk
4d81349825 Debugger: Don't let overlong filename stretch Creator window
Change-Id: I79cd3c471e09d04019833d09eea81d462ce477c9
Task-number: QTCREATORBUG-21885
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-18 14:55:08 +00:00
Christian Kandeler
ce19540b77 Move KitAspectWidget definitions alongside their KitAspects
A KitAspectWidget class is tightly coupled with the respective
KitAspect, and no one else ever needs to see any KitAspectWidget
subclass at build time.

Change-Id: I1883af3b054c225e1ff5dd913118715bfdbaacfc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 14:39:29 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
hjk
b93f21d87a Debugger: Clarify role of "Executable:" in Load Core File dialog
The file containing debug information is needed, this is typically
the executable, but other setups are possible.

Also make it a bit clearer in the code by using 'symbol' in a few
places that previously used 'localExecutable'.

Task-number: QTCREATORBUG-21910
Change-Id: I5c61bc03302c06baa58f82e1d5097f425f8936a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-02-04 13:47:10 +00:00
Eike Ziller
845af92889 Merge remote-tracking branch 'origin/4.8'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: Iaec96f929230754b87b32c2588db5cac5acd8453
2019-01-21 08:54:49 +01:00
hjk
de076eb889 Debugger: Switch default positions of preset panes
The different default positions of the "Breakpoint Preset" and the
"Breakpoint" views seem to cause confusion. They are apparently
perceived to be the same, and people file complaints about position
switching.

Change-Id: I29104552291f4e7f057ff8765243592da0b4cf74
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-18 10:48:12 +00:00