forked from qt-creator/qt-creator
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:
@@ -176,6 +176,10 @@ static void addThemesFromPath(const QString &path, QList<ThemeEntry> *themes)
|
|||||||
const QStringList themeList = themeDir.entryList();
|
const QStringList themeList = themeDir.entryList();
|
||||||
for (const QString &fileName : std::as_const(themeList)) {
|
for (const QString &fileName : std::as_const(themeList)) {
|
||||||
QString id = QFileInfo(fileName).completeBaseName();
|
QString id = QFileInfo(fileName).completeBaseName();
|
||||||
|
bool addTheme = true;
|
||||||
|
if (Core::ICore::isQtDesignStudio())
|
||||||
|
addTheme = id.startsWith("design");
|
||||||
|
if (addTheme)
|
||||||
themes->append(ThemeEntry(Id::fromString(id), themeDir.absoluteFilePath(fileName)));
|
themes->append(ThemeEntry(Id::fromString(id), themeDir.absoluteFilePath(fileName)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user