Skip to content

Fix nasty and still unclear bug with "Close Other" not closing all ta…#725

Merged
githubuser0xFFFF merged 1 commit into
githubuser0xFFFF:masterfrom
studiofuga:bugs/close_others
Mar 17, 2025
Merged

Fix nasty and still unclear bug with "Close Other" not closing all ta…#725
githubuser0xFFFF merged 1 commit into
githubuser0xFFFF:masterfrom
studiofuga:bugs/close_others

Conversation

@studiofuga

Copy link
Copy Markdown

In certain conditions, not clear which, when clicking on "Close Others", not all tabs are closed as expected, but one or two tabs are left open.
As said, it's not clear the origin of this bug. But we can consistently trigger it in our application.
Likely, the issue is a race condition between the Q_EMIT on requesting the close of the tab, and the subsequent isClosed test in the code handling the command.
Fortunately, there's a easy and elegant solution, that is, instead of fixing the tab index based on the close state of the being-closed tab, we can count backward and ignore wheather the tab was closed or not. This totally avoid the async problem with the user request.
This fixes the issue on our application and still works on the demo app.

@githubuser0xFFFF

Copy link
Copy Markdown
Owner

Thank you very much for this nice fix

@githubuser0xFFFF githubuser0xFFFF merged commit df1fa27 into githubuser0xFFFF:master Mar 17, 2025
mike-malburg pushed a commit to TechSmith/Qt-Advanced-Docking-System that referenced this pull request Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants