mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 17:42:28 +08:00
frontend: Fix warning for themeWatcher
This commit is contained in:
@@ -962,7 +962,6 @@ bool OBSApp::SetTheme(const QString &name)
|
||||
|
||||
void OBSApp::themeFileChanged(const QString &path)
|
||||
{
|
||||
themeWatcher->blockSignals(true);
|
||||
blog(LOG_INFO, "Theme file \"%s\" changed, reloading...", QT_TO_UTF8(path));
|
||||
SetTheme(currentTheme->id);
|
||||
}
|
||||
@@ -1002,12 +1001,6 @@ bool OBSApp::InitTheme()
|
||||
/* Load list of themes and read their metadata */
|
||||
FindThemes();
|
||||
|
||||
if (config_get_bool(userConfig, "Appearance", "AutoReload")) {
|
||||
/* Set up Qt file watcher to automatically reload themes */
|
||||
themeWatcher = new QFileSystemWatcher(this);
|
||||
connect(themeWatcher.get(), &QFileSystemWatcher::fileChanged, this, &OBSApp::themeFileChanged);
|
||||
}
|
||||
|
||||
/* Migrate old theme config key */
|
||||
if (config_has_user_value(userConfig, "General", "CurrentTheme3") &&
|
||||
!config_has_user_value(userConfig, "Appearance", "Theme")) {
|
||||
@@ -1042,5 +1035,11 @@ bool OBSApp::InitTheme()
|
||||
return SetTheme("com.obsproject.System");
|
||||
}
|
||||
|
||||
if (config_get_bool(userConfig, "Appearance", "AutoReload")) {
|
||||
/* Set up Qt file watcher to automatically reload themes */
|
||||
themeWatcher = new QFileSystemWatcher(this);
|
||||
connect(themeWatcher.get(), &QFileSystemWatcher::fileChanged, this, &OBSApp::themeFileChanged);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user