mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
UI: Avoid allowing to override provided themes
This commit is contained in:
+10
-10
@@ -425,6 +425,16 @@ void OBSApp::FindThemes()
|
||||
<< "*.oha" // OBS High-contrast Adjustment layer
|
||||
;
|
||||
|
||||
GetDataFilePath("themes/", themeDir);
|
||||
QDirIterator it(QString::fromStdString(themeDir), filters, QDir::Files);
|
||||
while (it.hasNext()) {
|
||||
OBSTheme *theme = ParseThemeMeta(it.next());
|
||||
if (theme && !themes.contains(theme->id))
|
||||
themes[theme->id] = std::move(*theme);
|
||||
else
|
||||
delete theme;
|
||||
}
|
||||
|
||||
if (GetConfigPath(themeDir.data(), themeDir.capacity(),
|
||||
"obs-studio/themes/") > 0) {
|
||||
QDirIterator it(QT_UTF8(themeDir.c_str()), filters,
|
||||
@@ -439,16 +449,6 @@ void OBSApp::FindThemes()
|
||||
}
|
||||
}
|
||||
|
||||
GetDataFilePath("themes/", themeDir);
|
||||
QDirIterator it(QString::fromStdString(themeDir), filters, QDir::Files);
|
||||
while (it.hasNext()) {
|
||||
OBSTheme *theme = ParseThemeMeta(it.next());
|
||||
if (theme && !themes.contains(theme->id))
|
||||
themes[theme->id] = std::move(*theme);
|
||||
else
|
||||
delete theme;
|
||||
}
|
||||
|
||||
/* Build dependency tree for all themes, removing ones that have items missing. */
|
||||
QSet<QString> invalid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user