Core: Only show design themes in Qt Design Studio

Task-number: QDS-12156
Change-Id: Ie2794104fa3f60537652d28f908cf5300540f530
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
Thomas Hartmann
2024-03-04 15:31:31 +01:00
parent cbd91b0167
commit 68663b312c

View File

@@ -176,7 +176,11 @@ static void addThemesFromPath(const QString &path, QList<ThemeEntry> *themes)
const QStringList themeList = themeDir.entryList();
for (const QString &fileName : std::as_const(themeList)) {
QString id = QFileInfo(fileName).completeBaseName();
themes->append(ThemeEntry(Id::fromString(id), themeDir.absoluteFilePath(fileName)));
bool addTheme = true;
if (Core::ICore::isQtDesignStudio())
addTheme = id.startsWith("design");
if (addTheme)
themes->append(ThemeEntry(Id::fromString(id), themeDir.absoluteFilePath(fileName)));
}
}