This is bit of a hack: The dock widget sizes were actually restored
but when previously non-existing docks were affected, a re-layout
was triggered, resulting in different sizes. This can be avoided
by instantiating all dock first.
Fixes: QTCREATORBUG-22415
Change-Id: I4c0b27f5bab5864e93e303db758d8b909a51a425
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Amends 5273ef2a8a
Use cases mentioned there should still work.
Fixes: QTCREATORBUG-22938
Fixes: QTCREATORBUG-22286
Change-Id: Ie7bb6b7ea6d05a94cbeeb5b8021dc638548778d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e9c0ba9997)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Amends 5273ef2a8a
Use cases mentioned there should still work.
Fixes: QTCREATORBUG-22938
Fixes: QTCREATORBUG-22286
Change-Id: Ie7bb6b7ea6d05a94cbeeb5b8021dc638548778d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Setting sizes on dock widgets one-by-one to restore previous
layouts does not work, as each triggers a delayed update taking
other (at that time "wrong" sizes) into account.
So store the layout as a whole, per-perspective.
Task-number: QTCREATORBUG-21669
Change-Id: I854cd175297b4ba1e53b404fcaa20092d216cec0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
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>
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>
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>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@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>