mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-15 07:44:10 +00:00
Move application initialization out of OBSApp constructor
This commit is contained in:
parent
e61cb07a94
commit
d41b9e2839
|
@ -195,6 +195,9 @@ bool OBSApp::InitLocale()
|
|||
|
||||
OBSApp::OBSApp(int &argc, char **argv)
|
||||
: QApplication(argc, argv)
|
||||
{}
|
||||
|
||||
void OBSApp::AppInit()
|
||||
{
|
||||
if (!InitApplicationBundle())
|
||||
throw "Failed to initialize application bundle";
|
||||
|
@ -464,6 +467,8 @@ static int run_program(fstream &logFile, int argc, char *argv[])
|
|||
|
||||
try {
|
||||
OBSApp program(argc, argv);
|
||||
program.AppInit();
|
||||
|
||||
OBSTranslator translator;
|
||||
|
||||
create_log_file(logFile);
|
||||
|
|
|
@ -64,6 +64,7 @@ private:
|
|||
public:
|
||||
OBSApp(int &argc, char **argv);
|
||||
|
||||
void AppInit();
|
||||
void OBSInit();
|
||||
|
||||
inline QMainWindow *GetMainWindow() const {return mainWindow.get();}
|
||||
|
|
Loading…
Reference in a new issue