Unbind containers from DockManager to prevent accidental reuse#823
Open
Ext3h wants to merge 1 commit intogithubuser0xFFFF:masterfrom
Open
Unbind containers from DockManager to prevent accidental reuse#823Ext3h wants to merge 1 commit intogithubuser0xFFFF:masterfrom
Ext3h wants to merge 1 commit intogithubuser0xFFFF:masterfrom
Conversation
Ext3h
commented
Mar 17, 2026
| #if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) | ||
| QWidget* MouseEventHandler = nullptr; | ||
| CFloatingWidgetTitleBar* TitleBar = nullptr; | ||
| CDockAreaWidget *SingleDockArea = nullptr; |
Author
There was a problem hiding this comment.
bbde511 had introduced inconsistent line endings. This repository does not appear to be using AUTOCLRF nor specify LineEnding in .clang-format, so that's likely to happen again...
Ext3h
commented
Mar 17, 2026
| { | ||
| FloatingDockContainer->hide(); | ||
| FloatingDockContainer->deleteLater(); | ||
| FloatingDockContainer->finishDropOperation(); |
Author
There was a problem hiding this comment.
hideAndDeleteLater has been recently renamed to finishDropOperation, but its functionality isn't just required for drop-operations.
Author
There was a problem hiding this comment.
Probably should be renamed to close() or teardown().
Ext3h
commented
Mar 17, 2026
| friend CAutoHideSideBar; | ||
|
|
||
| private Q_SLOTS: | ||
| void removeFromDockManager(); |
Author
There was a problem hiding this comment.
Name may be realigned with CFloatingDockContainer::finishDropOperation
Ext3h
commented
Mar 17, 2026
| // of the floating widget does not delete any dock areas that have been | ||
| // moved to a new container - simply remove all dock areas before deleting | ||
| // the floating widget | ||
| d->DockContainer->removeAllDockAreas(); |
Author
There was a problem hiding this comment.
Since we now have a dedicated teardown method in CDockContainerWidget, this internal call should be moved there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When explicitly removing container widget externally (eventually ending up in
CDockAreaWidget::removeDockWidget), there's a short time frame in which the old container was not removed from theCDockManageryet, but already marked asdeleteLater.This results in possible reuse of the already-to-be-deleted-container by
CDockManagerwhen immediately adding new container widgets before thedeleteLaterhas come into effect.In order to fix this:
CDockManagerinCDockAreaWidget::removeDockWidgetCFloatingDockContainerandCDockContainerWidgetback toCDockManagerto avoid further side effects.