Things like the OBSYouTubeActions dialog can reasonably only use the YouTube version of the Auth object.
|
OBSYoutubeActions::OBSYoutubeActions(QWidget *parent, Auth *auth, bool broadcastReady) |
|
: QDialog(parent), |
|
ui(new Ui::OBSYoutubeActions), |
|
apiYouTube(dynamic_cast<YoutubeApiWrappers *>(auth)), |
|
workerThread(new WorkerThread(apiYouTube)), |
|
broadcastReady(broadcastReady) |
Rather than taking an Auth and performing a cast, this dialog should take a YoutubeApiWrappers and rely on the caller to perform the cast and ensure it's valid.
This is only one example of this issue, and anyone handling this task should investigate other such examples and fix all of them.
Things like the OBSYouTubeActions dialog can reasonably only use the YouTube version of the Auth object.
obs-studio/frontend/dialogs/OBSYoutubeActions.cpp
Lines 20 to 25 in 5dacbb6
Rather than taking an
Authand performing a cast, this dialog should take aYoutubeApiWrappersand rely on the caller to perform the cast and ensure it's valid.This is only one example of this issue, and anyone handling this task should investigate other such examples and fix all of them.