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>
This way the debugger views can take up the whole window, which is
useful for the QML and perf profilers.
Change-Id: Ia4d236e8738a666d2316c05edaf4cf48ac46ffdb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
On shutdown the DebuggerMainWindow might not be alive anymore. By
connecting the signal handler to the window, rather than the plugin we
avoid dereferencing null pointers in that case.
Change-Id: I6421eebc6b1b76f176b31eafeb039d91edd3f0b3
Reviewed-by: hjk <hjk@qt.io>
This can happen if a previous session marked a plugin for not
loading and ended the session in a perspective provided by that
plugin.
Change-Id: I83a5dda421a1bb8ed2f8942f03e629e9c5d4d4ed
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
Make visibility the deciding factor which placeholder takes the main
editor area. A mode can have multiple placeholders as long as only a
single one is visible at a time.
Change-Id: I80b86dcb9e31b29f87fe42a465a3d3ad49eeef17
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
There are two layout stretches with equal stretch factors fighting
against each other. That makes the status label which is positioned
between the stretches jump around with changing content length.
This change increases the factor of the last stretch, which causes the
label position to stay constant.
Change-Id: I4e98d8b1fd6876f707911d1e90fa90165c8c2ff1
Reviewed-by: hjk <hjk@theqtcompany.com>
We call setParent(0) on the dock widgets, not on the actual operation
widgets. In order to find out which ones we need to delete we need to
check both the operations and the dock widgets.
Change-Id: Ia6fde9bc1737aab6b6ad5497b27e805bcd67d0ab
Task-number: QTCREATORBUG-16074
Reviewed-by: hjk <hjk@theqtcompany.com>
When disabling a dock widget, we don't want it to show up in the Views
menu anymore and we don't want it to interfere with other views.
setParent(0) accomplishes this. However, when showing a different
perspective we need to properly parent all the widgets that belong to
it.
Task-number: QTCREATORBUG-16027
Change-Id: I68e8cd4e6ade1dd8b23fb789f03edc39671aee91
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
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>
This spells trouble as dock widgets which have a native window will
assume they should be positioned relative to the outermost native
window then.
Change-Id: I5a8ce5870afacaabe26d4a2d7ac53ffee09328ed
Task-number: QTCREATORBUG-15844
Reviewed-by: hjk <hjk@theqtcompany.com>
To allow other mode main windows to re-use the perspective
concept.
Change-Id: Icf00b4f0e4bd73a09ebec131ef9c578154f25eec
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This was only used to accommodate the debugger main window
and is not needed in the base class.
Change-Id: Ifbe9937cd4c21f5bed2fab35b23d874f4f2dd0e4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
...to avoid adjusting the width again and again while debugging.
Change-Id: I67f68b2d54d9f3f9a32cbf1049b4f9e9bd63e010
Reviewed-by: hjk <hjk@theqtcompany.com>
On the user-visible side, only the 'Analyze' mode button disappears,
and instead a combobox to switch between different tools in appears
in the Debug mode toolbar.
Internally, that's quite some re-organzition: The centralized
'Analyze mode is busy' flag is gone, allowing us to run e.g.
ClangStaticAnalyzer and MemCheck in parallel.
Analyzer tools and debugger now share the same mechanism to
generate/load/save dock widgets.
Analyzer tools now create and handle their own start/stop button
when appropriate. In general, Analyzer tools can create/handle more
than one run control at a time.
Further consolidation is possible, e.g. RunControl state handling
could be merged into the base ProjectExplorer::RunControl to
avoid the still existing duplication in ~15 instances.
Change-Id: I91e5940ebc4211f98056d507cf2f7b5f8efe7f07
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
We have 'raise' in there now, that's not a split anymore.
Change-Id: Id45c606056dfab1317fad37b2fe37216b0eacf85
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
After some discussion we agreed that the contents is ephemeral
and does not need to survive perspective switching.
Change-Id: I41de6a8f9478e4bd229c8b204ef7a3fa0a344b75
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Next steps is to re-use it for ex-DebuggerMainWindow.
Change-Id: Ic272d062f6db2e54ed62082c2a7d3a289b810a03
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
... into a plain Utils::FancyMainWindow object and the debugger
specific functionality in Debugger::MainWindow.
A step forward to share the Utils::FancyMainWindow with the
(Ex-)Analyzer MainWindow and towards merging Analyzer and
Debugger mode.
Change-Id: I50e89d9d615226cb9b9af1a653c7383468e40a93
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>