From 68663b312c8c09b544c3f8dcbb0a6810a766162d Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 4 Mar 2024 15:31:31 +0100 Subject: [PATCH] Core: Only show design themes in Qt Design Studio Task-number: QDS-12156 Change-Id: Ie2794104fa3f60537652d28f908cf5300540f530 Reviewed-by: Brook Cronin Reviewed-by: Tim Jenssen Reviewed-by: Reviewed-by: Qt CI Patch Build Bot --- src/plugins/coreplugin/themechooser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/themechooser.cpp b/src/plugins/coreplugin/themechooser.cpp index e59c6d83a38..2903e573cac 100644 --- a/src/plugins/coreplugin/themechooser.cpp +++ b/src/plugins/coreplugin/themechooser.cpp @@ -176,7 +176,11 @@ static void addThemesFromPath(const QString &path, QList *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))); } }