obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
769 stars 217 forks source link

Replace SIGNAL and SLOT macro #397

Closed gxalpha closed 1 year ago

gxalpha commented 1 year ago

Description

First part of my quest to replace all uses of the SIGNAL and SLOT macros with the "new" (Qt 5+) connection style.

Motivation and Context

I will write a longer paragraph on the upcoming obs-studio PR, but essentially using this new connection style is superior in pretty much every way. This is because it catches issues with wrong connections at compile-time instead of at runtime, making sure bugs don't make their way into the program, of which we've had quite a few in the past.

How Has This Been Tested?

macOS 13.2 with master obs-studio Tested with a debugger and by commenting out the !cefBrowser if-statement above and the Init() call directly below that when using a dock, the Init() gets called with the connect statement and doesn't get called without it; and that browser docks and sources work.

Types of changes

Checklist: