KMainWindow compresses saving its configuration by a 500ms timer. However, for QDockWidget visibilityChanged a direct connection to the setSettingsDirty method is made, which immediately saves settings.
Since there is already an eventFilter also listening for QEvent::Show and QEvent::Hide, the connection to visibilityChanged is redundant since that signal is emitted from the respective event handler anyway.
The main benefit is that the eventFilter code compresses the configuration save, not jeopardizing startup time for applications with lots of dock widgets like Dolphin.
Details
Details
- Reviewers
dfaure aacid - Group Reviewers
Frameworks - Commits
- R263:d4af86d8d56d: Remove visibilityChanged connection in favor of existing eventFilter
Noticed that Dolphin repeatedly saved its configuration on startup, found this.
Previously it did 4 save calls (probably for every QDockWidget added) and then another queued one after startup was finished.
With this patch it only does a save call shortly after startup has completed.
Unittests still pass. Manually hiding dock widgets still has its configuration saved, albeit slightly delayed to before.
Diff Detail
Diff Detail
- Repository
- R263 KXmlGui
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.