Skip to content

Commit 1b41b44

Browse files
Warchamp7RytoEX
authored andcommitted
frontend: Fix warning for themeWatcher
1 parent 5f2720a commit 1b41b44

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

frontend/OBSApp_Themes.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ bool OBSApp::SetTheme(const QString &name)
962962

963963
void OBSApp::themeFileChanged(const QString &path)
964964
{
965-
themeWatcher->blockSignals(true);
966965
blog(LOG_INFO, "Theme file \"%s\" changed, reloading...", QT_TO_UTF8(path));
967966
SetTheme(currentTheme->id);
968967
}
@@ -1002,12 +1001,6 @@ bool OBSApp::InitTheme()
10021001
/* Load list of themes and read their metadata */
10031002
FindThemes();
10041003

1005-
if (config_get_bool(userConfig, "Appearance", "AutoReload")) {
1006-
/* Set up Qt file watcher to automatically reload themes */
1007-
themeWatcher = new QFileSystemWatcher(this);
1008-
connect(themeWatcher.get(), &QFileSystemWatcher::fileChanged, this, &OBSApp::themeFileChanged);
1009-
}
1010-
10111004
/* Migrate old theme config key */
10121005
if (config_has_user_value(userConfig, "General", "CurrentTheme3") &&
10131006
!config_has_user_value(userConfig, "Appearance", "Theme")) {
@@ -1042,5 +1035,11 @@ bool OBSApp::InitTheme()
10421035
return SetTheme("com.obsproject.System");
10431036
}
10441037

1038+
if (config_get_bool(userConfig, "Appearance", "AutoReload")) {
1039+
/* Set up Qt file watcher to automatically reload themes */
1040+
themeWatcher = new QFileSystemWatcher(this);
1041+
connect(themeWatcher.get(), &QFileSystemWatcher::fileChanged, this, &OBSApp::themeFileChanged);
1042+
}
1043+
10451044
return true;
10461045
}

0 commit comments

Comments
 (0)