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>
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>
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>
This behavior was broken with refactoring done in commit
3b5ecac238. This has two main components:
1. Perspective::select() needs to call EngineManager::activateDebugMode()
in order to save the previous mode.
2. The contents of the previous function
DebuggerPluginPrivate::activatePreviousMode() was placed in
EngineManager::deactivateDebugMode() and is called in
doFinishDebugger().
Task-number: QTCREATORBUG-21415
Change-Id: Ibca188ba740027769c497e25ea695af8e218ea4e
Reviewed-by: hjk <hjk@qt.io>
In some so far unknown situation the saveLayout/restoreLayout process leads
to a situation where some docks does not end up below the perspective toolbar
even though they were there initially, leading to an awkward dock layout.
Try to detect the situation (no other dock directly below the toolbar)
and correct that by restoring the default layout.
Task-number: QTCREATORBUG-21455
Change-Id: Ie5eaf2717a750823d96b103f9fd7ac194ba3914c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Makes s/foreach/for straight forward on the user code side.
Change-Id: I78aa0d06f538ebda491cd238ce81cc155b8d0beb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A step towards making the perspective handling independent of the
debugger plugin.
Change-Id: Ic07f4b34d44c48f16a494ba7f470e0a34d3d56a3
Reviewed-by: David Schulz <david.schulz@qt.io>
We'll need another one for GammaRay, and it's practically already
working as 'add', not 'set'. So fix the mis-nomer.
Change-Id: I1713ced6c39082dae0121b8d670c4676807c1602
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
May save a few cycles for re-creation and re-layouting flicker
when switching back.
Change-Id: Ifc29adb008d2fa0966f68fe45b3258e6dd199d08
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Switching to Debug mode did no more fully respect the last
active perspective, but instead restored it and afterwards
initialized the debugger engine and restored the
respective Debugger perspective.
Change-Id: I5ba34298f463c396b7f73e431efa76be3bcbe6eb
Reviewed-by: hjk <hjk@qt.io>
It's essentially a property of the dock widget, and we fully control it.
So store the information there.
Also, using QString as id saves a few conversions.
Change-Id: I9e1add60c8451127363aba67eec295001cc3425b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Also, use QString uniformly for the (now rarely used) perspective ids.
Change-Id: I682062e7d179d0fcfd309e7714713bd1218bd8bb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Pass id in constructor, so it can be const.
Change-Id: Id33fe19c4416109af8aa05a3ed0a09918eeb5cdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
ManhattanStyle adapts the palette of widgets in its polish(...) method.
But creating widgets directly schedules a polish event, and after a
widget was polished it will never be polished again (except if the style
changes).
Before f45f1a8cef, toolbar widgets were
directly added to the widget hierarchy of the toolbar, but now that is
no longer the case. That means that the widgets are polished before they
are added to the toolbar hierarchy, so ManhattanStyle does not change
their palette.
To fix this we explicitly make tool bar widgets "panelwidget"s when they
are added to a perspective.
Task-number: QTCREATORBUG-20916
Change-Id: I659798c7c314a481d1ec467b1877f2e6ddd6da70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This simplifies the toolbar setup and removes the need for the
stack of toolbar widgets.
The actions themselves have been owned by the plugin already,
so nothing changed in this respect.
Change-Id: I44754e16c8fc2acc53633dd9d560b1e732eece27
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Similar to the previous patch, but affecting more plugins: with dynamic
perspectives lifetime is better managed close to the code that knows how
to (re-)construct the items.
Change-Id: I0e7bfcf769d198ec2afa88b972be900baa1b6a46
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It's only used in GammaRay currently, and with dynamic perspectives
lifetime is better managed close to the code that knows how to
(re-)construct the beasts.
Change-Id: I9e8ebe2e93d749a62fb008f773f1702a4c0bab3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Make perspectives and tool bars destroyable. This is a
step forward to multiply debugger engines whose perspective's
life time is connected to the engine, not the debug mode.
In the present setup there are two kind of perspective:
1 - static: with a lifetime associated to the application
(or, rather, plugin that defines them). These are listed
in the perspective chooser, later e.g. Debugger for
pre-set breakpoints
2 - dynamic: with a shorted lifetime, e.g. running GDB engine.
Presently, and possibly also in future so, a dynamic
perspective is related to exactly one of the static
perspectives, i.e. are kind of "child".
Change-Id: Ic11572e7121e14f8da2927a0c0ac3441c99073a3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Always save on exit, but do not expect a valid perspective name
on restart. The settings could get corrupted in the mean time etc.
Change-Id: Ic0181607f46c3350a4193240d795d4c0d7c6815b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This essentially replaces saveCurrentPerspective by some
savePerspectiveHelper(m_currentPerspectiveId)
This is in preparation of the change introducing multiple running
engines, and per-engine perspectives.
Change-Id: Ibdbdac019bb5d47936ba4ab5de08711f2c16ea99
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
It will be needed later to show/hide the buttons depending on
engine-specific abilities or other circumstances.
Change-Id: I029012e01929e5e96e2af87da2cf3580a8d82b3f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Arguably wrong as a concept, but the issue keeps coming back.
Change-Id: Id0b084999884c1f018e3de60bb04c5288f7031ad
Task-number: QTCREATORBUG-1214
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This enables us to mark perspectives as disabled.
Change-Id: I52b2434f33f8550b6d2459f915dfd8cdb1389140
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This kind of conflicts with the Alt-V + [0-9V] FakeVim short cuts,
but since those are rarely used and still operational in edit mode
I think that's acceptable.
Change-Id: If232cc6574690e0219eddcaa89d844f498687b64
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>