mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-18 19:28:56 -05:00
UI: handle theme file names with "." characters
Use QFileInfo::completeBaseName() to get name up to .qss for use as Theme name.
This commit is contained in:
@@ -1215,7 +1215,7 @@ void OBSBasicSettings::LoadThemeList()
|
||||
QDir::Files);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
QString name = it.fileName().section(".", 0, 0);
|
||||
QString name = it.fileInfo().completeBaseName();
|
||||
ui->theme->addItem(name);
|
||||
uniqueSet.insert(name);
|
||||
}
|
||||
@@ -1231,7 +1231,7 @@ void OBSBasicSettings::LoadThemeList()
|
||||
QDir::Files);
|
||||
while (uIt.hasNext()) {
|
||||
uIt.next();
|
||||
QString name = uIt.fileName().section(".", 0, 0);
|
||||
QString name = uIt.fileInfo().completeBaseName();
|
||||
|
||||
if (name == DEFAULT_THEME)
|
||||
name = defaultTheme;
|
||||
|
||||
Reference in New Issue
Block a user