Commit Graph

1092 Commits

Author SHA1 Message Date
hjk
2a104dcfe7 Debugger: Consolidate icon storage handling
We settled now on global objects being fine for the purpose
in Core and ProjectExplorer, so there's no point in using
something more fancy in the debugger.

Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 14:28:01 +00:00
Orgad Shaneh
7d31cb0e18 Debugger: De-slot
Most Qt4 connects are gone.

Change-Id: Ie74cfb11fc4b4c531f9e22c95a4d18336e1c29e8
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-28 06:20:21 +00:00
Eike Ziller
4f9016e03f Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/android.qbs
	src/plugins/android/androiddevice.cpp
	src/plugins/autotest/testcodeparser.cpp
	src/plugins/debugger/analyzer/analyzerstartparameters.h
	src/plugins/projectexplorer/devicesupport/desktopdevice.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.h

Change-Id: I2474d06f2309fa71210a8401846bc2ef85bebf1d
2016-06-22 11:09:32 +02:00
hjk
3f11ef9216 Avoid using dynamic_cast<>
dynamic_cast<> breaks in cross-library situations. In the past
the issue was witnessed on Mac, this time on FreeBSD in
various configurations.

The workaround deployed here is to manually create unique
type ids in form of (addresses of) global variables.

Task-id: QTCREATORBUG-16462
Change-Id: Ie28fbb3d31d06c1a722a3d9ea808831191298e71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-22 07:31:41 +00:00
hjk
78a800cb34 Debugger: Use dedicated structure for Qml server parameters
The main idea is to start using ProjectExplorer::Connection later.

Change-Id: Ie91eacdfb0e93ae142fec7ce32bcf554a5282122
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-14 06:25:34 +00:00
hjk
726b907cc3 Debugger: Remove debuggerstringutils.h
With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on
QString is feasible again. Take this as opportunity to move
debugger encoding handling closer to a 'conversion on input and
output if needed, storage in QString only' scheme.

Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-09 08:09:46 +00:00
hjk
db9437c2e8 Generalize IDevice::qmlProfilerHost
The idea is to have a way for tools to specify what kind of
control channel they would like to use to communicate with
a device without making the choice explicit dependent on
the exact kind of tool to further decouple device and tool
implementations.

The 'hint' values are there to help the device implementation
to decide on which channel to use exactly in case there are
multiple choices. In any case, the tool is responsible to
check that the returned channel is suitable for its operation.

Currently the only choice is "QmlControlChannel" yielding
a simple wrapper around the former IDevice::qmlProfilerHost()
return value.

Other enum values may potentially be {Tcp,LocalSocket}ControlChannel
(to specify a type of transport) AdbChannel (to specify some
generic helper mechanism). It might also turn out that something
more complex than an enum will be needed, e.g. to express
a set of values with priorities or such, but I'd rather
avoid overengineering for now.

Change-Id: Id386425eb3dd2bb395065f0bdb6f67217cd40a71
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-06-08 08:16:22 +00:00
hjk
58f25a3260 ClangStaticAnalyzer: Start tool directly in test
Removes the only user of DEBUGGER_EXPORT void runAction(Core::Id actionId)

Change-Id: Ia26577e07ccc8a556882d99d6dd9f9c29c3bc883
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-06-01 08:45:17 +00:00
hjk
ae19d452b6 Debugger: Move remaining Analyzer overlay icon to ProjectExplorer
It's the only remaining item and loosens the dependencies of
ex-AnalyzerBase based plugins on the the Debugger.

Change-Id: I943ac44401c440dd6d3d5c1f54f8f996accd2b4a
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-30 15:07:26 +00:00
hjk
4320aeea18 ProjectExplorer: Move Runnable/Connection model into class
Somewhat better encapsulation.

Removes the "false" sharing of Concept implementations, and takes
the opportunity to change the operator==() into a 'canReUseOutputPane'
function to be explicit about its only use.

This doesn't solve the change in output pane reuse behavior yet,
but provides the base to put the required logic into canReUseOutputPane,
as opposed to abusing the general equality concept.

Change-Id: Id9e4e6b8601c5fcf40a252fb423c2c4c2b74ddb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-20 10:05:41 +00:00
Eike Ziller
ec231b5910 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/valgrind/valgrindruncontrolfactory.cpp

Change-Id: I96c0f8cc3b49f8f55f45ef1f839857f878f532f4
2016-05-18 12:12:46 +02:00
Christian Stenger
8daaa2f651 Debugger: Restructure cleaning up after test
If the test case would result in a failing test it does not
execute further commands.
Ensure to close possible open editors even for failed test runs.

Change-Id: Ifcdcb76de5d10f649d38b84dad8999c6fd491ade
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-18 07:16:26 +00:00
Alessandro Portale
ad55f0bd84 Debugger: Proper menu icon for "Profile Costs of This Function..."
Don't use the toolbar variant, there.

Change-Id: I820d3e51567bfeff4eec2277f20b52fb617d1eee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-17 10:49:06 +00:00
hjk
df8e3b5925 Debugger: Let perspectives specify their central widget
The default 0 value will be interpreted as 'use the editor stack'.

Also, drop the idea of value semantics for Perspective objects
to get a simpler approach to the destruction of owned widgets
(tools docks + central widget)

Change-Id: Ic6470411ee5d387c43447f95b5a12c81c6658ff8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-13 11:34:00 +00:00
hjk
60f092f6bb Debugger: Cosmetics
Qt 5 connects, unused declaration, QLatin1Strings, ...

Change-Id: If09929993d750907ee3f4e2fa9f18acfcc28d9c1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-05-12 15:08:16 +00:00
hjk
dd5e145d34 Debugger: Expose mainWindow to other plugins
Needed by GammaRay integration when merging the modes.

Change-Id: I21ee65c55e242238ab0be244c4bb40f1c9c7924e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-05-12 12:33:12 +00:00
Alessandro Portale
2c2b172221 Debugger: Fresh icons for QtQuick "App on Top" and "Select"
Since these two features are revived for Qt 5.7, they deserve fresh
icons. And since they could also gain back their place in the
(qml)debugger toolbar, this patch provides also the toolbar icon
variants.

Change-Id: Id8c51aaa7ab81f594103fe1538fe6efe153af56a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-05-09 09:08:18 +00:00
Alessandro Portale
97cd094009 Debugger: Display separate icons for toolbar and menu
Overriding the ProxyAction icons accordingly.

Change-Id: I52b6414fe6a0b1128394452f599b2b6c67d37e53
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-04 10:37:26 +00:00
Eike Ziller
0f94aa3f4d Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/debugger/debuggerruncontrol.cpp
	src/plugins/projectexplorer/projectwizardpage.cpp
	src/plugins/projectexplorer/xcodebuildparser.h
	src/plugins/qmldesigner/qmldesignerplugin.cpp
	src/tools/clangbackend/ipcsource/translationunits.cpp

Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
2016-05-03 11:49:01 +02:00
Orgad Shaneh
b280c4125b Debugger: Use continue on dialog triggered remote debugging
Change-Id: I171af41f7527bd99f5d52259674d76f5b580e6bb
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-03 05:56:41 +00:00
hjk
aba988cb81 Debugger: One more safety belt
Task-number: QTCREATORBUG-16179
Change-Id: I661669cd6bf0cf8945c198c9c8d113b7a81c3073
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-04-29 13:37:12 +00:00
Christian Stenger
b688d18de4 Debugger: Avoid nullptr access
Change-Id: Iff5c48d83fa7989798f1ff34868a5b37f439a744
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-26 15:22:10 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Eike Ziller
6c2d890830 Show shortcuts in tool tips of debugger tool bar actions
These actions are supposed to behave exactly like the ones in the menu,
so use these.

Change-Id: I21b4a170839ec009d6462d033329cd6fda6b516a
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-22 08:21:25 +00:00
Alessandro Portale
5e32183c9b Theme: Separate run/stop/interrupt icons in menus
And for that, we also need separate theme color roles.

Change-Id: I27bf4499acb516f7f824f5e57632797653b150ec
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 15:57:56 +00:00
hjk
344849bdf3 Debugger: Guard DebuggerPlugin::m_currentEngine with QPointer
Change-Id: Id0bcca4ca2dba21409e37197269b8166070cf572
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-04-21 14:13:46 +00:00
Christian Stenger
3d28c516c6 Debugger: Avoid soft assert on close
Introduced with d432b14472.

Change-Id: Ic33d46a33efd1c09c162c6adc31526efd4fe2b9d
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 09:09:40 +00:00
Christian Stenger
d432b14472 Debugger: Avoid crash in plugin unit test
Change-Id: I38d74f4a34e14f646eaf9f24ca9dc2e14ba06050
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 14:39:13 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
Ulf Hermann
385237dbbd Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port.

Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-20 11:06:34 +00:00
Alessandro Portale
397ebcac92 Debugger: Enabled state of "Threads:" label depends on thread combobox
...and making sure that items of a disabled combobox are visibly
disabled.

This prevents users from clicking on the Threads label before debugging
even started.

Change-Id: I59cc9b7e875fe8c126a9ee4221ff9d8322e4b1a8
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 11:25:37 +00:00
Orgad Shaneh
b2e048c10e Debugger: Fix language context actions
... again

Task-number: QTCREATORBUG-16099
Change-Id: Ie0a902a3161ca72cf78695639598eac5fdcbace5
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 10:38:20 +00:00
Alessandro Portale
a24ce30425 Debugger: Remove QML application Zoom (for now)
It does not work.

Change-Id: I8340d6b130d3d7e1e8f1531fe4cd2b6cd9319c7b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-04-18 09:13:50 +00:00
Eike Ziller
8a77eacf8d Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
2016-04-15 10:07:55 +02:00
Orgad Shaneh
6655f87fca Debugger: Change default languages to NoLanguages
... which is set to CppLanguage in DebuggerRunControlCreator::enrich
unless set to anything else previously.

Remove related hacks.

Change-Id: I5fcc39326e280192eb1ddb652636e9342baef94b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-13 07:58:33 +00:00
hjk
c75b8f22fa Debugger: Remove special handling for event dispatcher files
Too much convenience seems to cause irritations.

Task-number: QTCREATORBUG-15638
Change-Id: Iaf90149372641bcb7fece28a7470558a80d77a4e
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-04-13 07:28:55 +00:00
Eike Ziller
5c87432260 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp

Change-Id: I6ae2d37290643d69390f679a54f7596782f3d97f
2016-04-12 11:34:46 +02:00
Alessandro Portale
9373f76b2a Icons: Move Run/Stop/Interrupt from projectexplorer to core
Change-Id: Iba65c2ede538049c9b203fd4c2f99ef552019862
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-10 20:08:43 +00:00
Alessandro Portale
63cbcbc729 Locator: Remove old "Locator" menu icon. Re-use the "search" icon.
This patch removes the locator.png icon and replaces it with a
menu-friendly variation of the zoom icon.

The current ZOOM icon becomes ZOOM_TOOLBAR.

Change-Id: I8817c5c420801351db659caa4c4190a9074be720
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-08 15:59:10 +00:00
hjk
5e47d35fcd Use Core::Id in ModeManager interface
Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.

Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-04-08 10:38:49 +00:00
Orgad Shaneh
7dc2cb9d95 Debugger: Support only C++ on Windows post-mortem debugging
Change-Id: Idc759cb0a5a64fe33ea54eb4d0bf21df2a651bd9
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-07 08:46:56 +00:00
Eike Ziller
1ae483fc83 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/libs/utils/tcpportsgatherer.h

Change-Id: I495f3e05789f09efb8b1e84827893423a5b5b60c
2016-04-05 14:11:47 +02:00
Christian Stenger
40b6413201 Debugger: Fix crash on close while debugging
Task-number: QTCREATORBUG-15987
Change-Id: I510add216ec16c0c6622870f26c68c16e99769ed
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-05 10:21:03 +00:00
Oswald Buddenhagen
e426d08e54 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/debugger/debuggerruncontrol.cpp

Change-Id: I81b43480a1369e3d7be60ae26e812dda6b962b0b
2016-04-01 17:31:39 +02:00
Alessandro Portale
ea1f5d2b6c Icons: Move debug run/interrupt/continue/exit from core to elsewhere
Core contains the small variants of debug run/interrupt/continue/exit
while the bigger icon variants are in projectexplorer or debugger. That
does not seem to have aany reason, at least in today's state of Qt
Creator architecture.

But above all, it stands in the way when changing debugger icons as
planned due to user feedback.

This change moves:

   Core::Icons::DEBUG_START_SMALL
to ProjectExplorer::Icons::DEBUG_START_SMALL

   Core::Icons::DEBUG_EXIT_SMALL
to Debugger::Icons::DEBUG_EXIT_SMALL

   Core::Icons::DEBUG_INTERRUPT_SMALL
to Debugger::Icons::DEBUG_INTERRUPT_SMALL

   Core::Icons::DEBUG_CONTINUE_SMALL
to Debugger::Icons::DEBUG_CONTINUE_SMALL

This change just moves icons across modules but does not change anything
in the UI.

Change-Id: I859b901c312d4d16b6c2f687395a7b48c90aab84
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-01 14:26:03 +00:00
Orgad Shaneh
e13f1a5047 Debugger: Fix memory leaks
Detected by memcheck.

Change-Id: I56c0c39f3aa2251d6425ddc9388fdebc511d7f47
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-26 17:25:04 +00:00
hjk
259c3cb4d4 Debugger: Fix object leakage on shutdown and heap-use-after-free.
Task-number: QTCREATORBUG-15938
Change-Id: I437756705c33730398a129651fabe34c92334656
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 15:02:56 +00:00
hjk
e16b02c680 Debugger: Move kit guessing out of run control creation
It's only used when starting with a -debug command line and
when attaching to a running run control. No need to clutter
the normal codepaths with it.

Change-Id: Ib374c64a7f63fa79e88967573c37a5da1f415d50
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 14:19:19 +00:00
hjk
d27d51050c Debugger: Use kit macro expander instead of global one where possible
This is low hanging fruit enabling a lot more customization.

Change-Id: I1a90fa731ea512852c12a55fad75551efb44e875
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-23 08:11:47 +00:00
Tim Jenssen
c6849c5616 Debugger: fix crash in updateUiForTarget
- it happens while removing the only existing kit

Change-Id: Ifc2e9eae2836b496f9f696ff91e2999dc1904800
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-17 14:04:19 +00:00