Skip to content

frontend: Use Qt parent-child ownership in OAuth dialog#12716

Merged
PatTheMav merged 2 commits intoobsproject:masterfrom
PatTheMav:oauth-crash-fix
Oct 17, 2025
Merged

frontend: Use Qt parent-child ownership in OAuth dialog#12716
PatTheMav merged 2 commits intoobsproject:masterfrom
PatTheMav:oauth-crash-fix

Conversation

@PatTheMav
Copy link
Member

@PatTheMav PatTheMav commented Oct 10, 2025

Description

Explicitly adds the OAuth dialog as a child element to its parent widget and removes the explicit delete call, 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

  • Bug fix (non-breaking change which fixes an issue)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

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.
@WizardCM WizardCM added Bug Fix Non-breaking change which fixes an issue Code Cleanup Non-breaking change which makes code smaller or more readable labels Oct 16, 2025
@PatTheMav PatTheMav added the Seeking Testers Build artifacts on CI label Oct 16, 2025
@PatTheMav PatTheMav merged commit 5ec3af3 into obsproject:master Oct 17, 2025
15 checks passed
@PatTheMav PatTheMav deleted the oauth-crash-fix branch October 17, 2025 12:31
@RytoEX RytoEX linked an issue Oct 22, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Non-breaking change which fixes an issue Code Cleanup Non-breaking change which makes code smaller or more readable Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault after authentication to Twitch via Chromium obs-browser crash when connecting to Twitch account

3 participants