frontend: Use Qt parent-child ownership in OAuth dialog#12716
Merged
PatTheMav merged 2 commits intoobsproject:masterfrom Oct 17, 2025
Merged
frontend: Use Qt parent-child ownership in OAuth dialog#12716PatTheMav merged 2 commits intoobsproject:masterfrom
PatTheMav merged 2 commits intoobsproject:masterfrom
Conversation
By explicitly setting the OAuth dialog as the parent of the CEF widget, it will automatically by cleaned up as soon as the dialog is closed itself. This also detaches the destruction of the widget from the browser cleanup code.
2663ed5 to
42159b4
Compare
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.
Description
Explicitly adds the OAuth dialog as a child element to its parent widget and removes the explicit
deletecall, as Qt will take care of cleanup as part of its ownership model.Motivation and Context
This is a companion PR to obsproject/obs-browser#506. While it does not functionally require the change from
obs-browser, it is only tested to work in tandem with it.By explicitly setting the OAuth dialog as the parent of the CEF widget, it will automatically by cleaned up as soon as the dialog is closed itself.
This also detaches the destruction of the widget from the browser cleanup code.
Fixes #12706
How Has This Been Tested?
Tested on macOS and Windows by successfully establishing service connections and also aborting any such attempt to establish a connection after the login dialog had been opened.
Types of changes
Checklist: