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

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Tue Jan 7 16:49:32 GMT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200107/1a8a22d8/attachment.html>


More information about the Kde-frameworks-devel mailing list