D26501: KMainWindow: fix autoSaveSettings to catch QDockWidgets being shown again

2020-01-11 Thread Friedrich W. H. Kossebau
This revision was automatically updated to reflect the committed changes.
Closed by commit R263:6f08f7ae576a: KMainWindow: fix autoSaveSettings to catch 
QDockWidgets being shown again (authored by kossebau).

REPOSITORY
  R263 KXmlGui

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D26501?vs=73004=73265

REVISION DETAIL
  https://phabricator.kde.org/D26501

AFFECTED FILES
  src/kmainwindow.cpp

To: kossebau, #frameworks, #kdevelop, dfaure
Cc: SGOrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26501: KMainWindow: fix autoSaveSettings to catch QDockWidgets being shown again

2020-01-11 Thread David Faure
dfaure accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R263 KXmlGui

BRANCH
  catchdockwidgetsshowninstate

REVISION DETAIL
  https://phabricator.kde.org/D26501

To: kossebau, #frameworks, #kdevelop, dfaure
Cc: SGOrava, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26501: KMainWindow: fix autoSaveSettings to catch QDockWidgets being shown again

2020-01-07 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  KMainWindowPrivate::CompressCalls being used here still exposes a small 
issue, as this opens a small time window where the state is not catched before 
a xmlgui client change happens, so some finalizeGUI might (in theory) still use 
old state data, as autoSaveSettings is not yet triggered on e.g. xmlgui client 
removal.
  Something to look into next. But this here should improve things already a 
lot.

REPOSITORY
  R263 KXmlGui

REVISION DETAIL
  https://phabricator.kde.org/D26501

To: kossebau, #frameworks, #kdevelop, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D26501: KMainWindow: fix autoSaveSettings to catch QDockWidgets being shown again

2020-01-07 Thread Friedrich W. H. Kossebau
kossebau created this revision.
kossebau added reviewers: Frameworks, KDevelop, dfaure.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  If QDockWidgets are "shown" in QWidget sense a second time, no resize or
  move events might happen as the widget has already been layouted before
  and might simply reappear at same position with same size.
  The old logic did not catch this, so would keep an outdated state stored
  in the auto-save settings of the window, which then would result in wrong
  state being enforced on restoring.

TEST PLAN
  Open KDevelop, open a toolview which was not open before (e.g. "Search in
  all Files"), switch to another toolview not open before, then switch back
  to the first toolview. Now either switch the currently viewed document
  (e.g. open another file) or quit & reopen KDevelop.
  Before the first toolview would hide itself despite officially being still
  visible, with this patch the state is properly hold (when internally being
  restored, like during finalizeGUI on KXmlGui client change).

REPOSITORY
  R263 KXmlGui

BRANCH
  catchdockwidgetsshowninstate

REVISION DETAIL
  https://phabricator.kde.org/D26501

AFFECTED FILES
  src/kmainwindow.cpp

To: kossebau, #frameworks, #kdevelop, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns