Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kf6-kiconthemes for openSUSE:Factory checked in at 2025-02-16 22:38:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kf6-kiconthemes (Old) and /work/SRC/openSUSE:Factory/.kf6-kiconthemes.new.8181 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kf6-kiconthemes" Sun Feb 16 22:38:34 2025 rev:12 rq:1245947 version:6.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kf6-kiconthemes/kf6-kiconthemes.changes 2025-01-12 11:18:39.785554450 +0100 +++ /work/SRC/openSUSE:Factory/.kf6-kiconthemes.new.8181/kf6-kiconthemes.changes 2025-02-16 22:44:37.354256775 +0100 @@ -1,0 +2,19 @@ +Sat Feb 8 12:16:49 UTC 2025 - Christophe Marin <christo...@krop.fr> + +- Update to 6.11.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/6/6.11.0 +- Changes since 6.10.0: + * Update dependency version to 6.11.0 + * KIconLoader: ensure thread safety + * kiconloader/kiconthemes: allow querying all icons easily + * kiconloader: DRY code by removing duplication + * Fix build with Qt 6.10 + * Add xml/yaml linting + * Prefer a std::vector to a new-allocated array + * CI: Add linux-qt6-next build + * Add Alpine CI + * Update version to 6.11.0 + +------------------------------------------------------------------- Old: ---- kiconthemes-6.10.0.tar.xz kiconthemes-6.10.0.tar.xz.sig New: ---- kiconthemes-6.11.0.tar.xz kiconthemes-6.11.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kf6-kiconthemes.spec ++++++ --- /var/tmp/diff_new_pack.iLlnOn/_old 2025-02-16 22:44:38.938322665 +0100 +++ /var/tmp/diff_new_pack.iLlnOn/_new 2025-02-16 22:44:38.938322665 +0100 @@ -25,7 +25,7 @@ %{!?_kf6_bugfix_version: %define _kf6_bugfix_version %(echo %{_kf6_version} | awk -F. '{print $1"."$2}')} %bcond_without released Name: kf6-kiconthemes -Version: 6.10.0 +Version: 6.11.0 Release: 0 Summary: Icon GUI utilities License: LGPL-2.1-or-later AND GPL-2.0-or-later ++++++ kiconthemes-6.10.0.tar.xz -> kiconthemes-6.11.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/.gitlab-ci.yml new/kiconthemes-6.11.0/.gitlab-ci.yml --- old/kiconthemes-6.10.0/.gitlab-ci.yml 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/.gitlab-ci.yml 2025-02-07 15:01:26.000000000 +0100 @@ -5,7 +5,11 @@ - project: sysadmin/ci-utilities file: - /gitlab-templates/linux-qt6.yml + - /gitlab-templates/linux-qt6-next.yml - /gitlab-templates/linux-qt6-static.yml - /gitlab-templates/android-qt6.yml - /gitlab-templates/freebsd-qt6.yml - /gitlab-templates/windows-qt6.yml + - /gitlab-templates/alpine-qt6.yml + - /gitlab-templates/xml-lint.yml + - /gitlab-templates/yaml-lint.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/.kde-ci.yml new/kiconthemes-6.11.0/.kde-ci.yml --- old/kiconthemes-6.10.0/.kde-ci.yml 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/.kde-ci.yml 2025-02-07 15:01:26.000000000 +0100 @@ -1,17 +1,17 @@ Dependencies: -- 'on': ['@all'] - 'require': + - 'on': ['@all'] + 'require': 'frameworks/extra-cmake-modules': '@same' - 'frameworks/ki18n' : '@same' - 'frameworks/kconfig' : '@same' - 'frameworks/kwidgetsaddons' : '@same' - 'frameworks/karchive' : '@same' - 'frameworks/kcolorscheme' : '@same' + 'frameworks/ki18n': '@same' + 'frameworks/kconfig': '@same' + 'frameworks/kwidgetsaddons': '@same' + 'frameworks/karchive': '@same' + 'frameworks/kcolorscheme': '@same' -- 'on': [ 'Linux', 'FreeBSD', 'Windows' ] - 'require': + - 'on': ['Linux', 'FreeBSD', 'Windows'] + 'require': 'frameworks/breeze-icons': '@same' Options: - test-before-installing: True - require-passing-tests-on: [ 'Linux', 'FreeBSD', 'Windows', 'Android' ] + test-before-installing: True + require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows', 'Android'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/CMakeLists.txt new/kiconthemes-6.11.0/CMakeLists.txt --- old/kiconthemes-6.10.0/CMakeLists.txt 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/CMakeLists.txt 2025-02-07 15:01:26.000000000 +0100 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "6.10.0") # handled by release scripts -set(KF_DEP_VERSION "6.10.0") # handled by release scripts +set(KF_VERSION "6.11.0") # handled by release scripts +set(KF_DEP_VERSION "6.11.0") # handled by release scripts project(KIconThemes VERSION ${KF_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 6.10.0 NO_MODULE) +find_package(ECM 6.11.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -48,6 +48,10 @@ find_package(Qt6Widgets ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) find_package(Qt6Svg ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +if (Qt6Gui_VERSION VERSION_GREATER_EQUAL "6.10.0") + find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) +endif() + if (KICONTHEMES_USE_QTQUICK) find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick) endif() @@ -84,7 +88,7 @@ ecm_set_disabled_deprecation_versions( QT 6.8.0 - KF 6.8.0 + KF 6.10.0 ) add_definitions(-DTRANSLATION_DOMAIN=\"kiconthemes6\") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/metainfo.yaml new/kiconthemes-6.11.0/metainfo.yaml --- old/kiconthemes-6.10.0/metainfo.yaml 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/metainfo.yaml 2025-02-07 15:01:26.000000000 +0100 @@ -13,7 +13,7 @@ deprecated: false release: true libraries: - - cmake: "KF6::IconThemes" + - cmake: "KF6::IconThemes" cmakename: KF6IconThemes public_lib: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/kiconloader.cpp new/kiconthemes-6.11.0/src/kiconloader.cpp --- old/kiconthemes-6.10.0/src/kiconloader.cpp 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/kiconloader.cpp 2025-02-07 15:01:26.000000000 +0100 @@ -52,6 +52,50 @@ #include <qplatformdefs.h> //for readlink +namespace +{ + +/** + * Checks if name ends in one of the supported icon formats (i.e. .png) + * and returns the name without the extension if it does. + */ +QString removeIconExtension(const QString &name) +{ + if (name.endsWith(QLatin1String(".png")) // + || name.endsWith(QLatin1String(".xpm")) // + || name.endsWith(QLatin1String(".svg"))) { + return name.left(name.length() - 4); + } else if (name.endsWith(QLatin1String(".svgz"))) { + return name.left(name.length() - 5); + } + + return name; +} + +QStringList deduplicateIconsByName(const QStringList &icons) +{ + // Eliminate duplicate entries (same icon in different directories) + QStringList result; + QStringList entries; + for (const auto &icon : icons) { + const int n = icon.lastIndexOf(QLatin1Char('/')); + QString name; + if (n == -1) { + name = icon; + } else { + name = icon.mid(n + 1); + } + name = removeIconExtension(name); + if (!entries.contains(name)) { + entries += name; + result += icon; + } + } + return result; +} + +} // namespace + /** * Function to convert an uint32_t to AARRGGBB hex values. * @@ -95,6 +139,7 @@ KIconThemeNode(const KIconThemeNode &) = delete; KIconThemeNode &operator=(const KIconThemeNode &) = delete; + [[nodiscard]] QStringList queryIcons() const; void queryIcons(QStringList *lst, int size, KIconLoader::Context context) const; void queryIconsByContext(QStringList *lst, int size, KIconLoader::Context context) const; QString findIcon(const QString &name, int size, KIconLoader::MatchType match) const; @@ -112,6 +157,11 @@ delete theme; } +QStringList KIconThemeNode::queryIcons() const +{ + return theme->queryIcons(); +} + void KIconThemeNode::queryIcons(QStringList *result, int size, KIconLoader::Context context) const { // add the icons of this theme to it @@ -221,8 +271,7 @@ /* antlarr: There's no need to delete d->mpThemeRoot as it's already deleted when the elements of d->links are deleted */ qDeleteAll(links); - delete[] mpGroups; - mpGroups = nullptr; + mpGroups.clear(); mPixmapCache.clear(); m_appname.clear(); searchPaths.clear(); @@ -370,7 +419,7 @@ // load default sizes initIconThemes(); KIconTheme *defaultSizesTheme = links.empty() ? nullptr : links.first()->theme; - mpGroups = new KIconGroup[static_cast<int>(KIconLoader::LastGroup)]; + mpGroups.resize(int(KIconLoader::LastGroup)); for (KIconLoader::Group i = KIconLoader::FirstGroup; i < KIconLoader::LastGroup; ++i) { if (groups[i] == nullptr) { break; @@ -545,19 +594,6 @@ d->drawOverlays(this, group, state, pixmap, overlays); } -QString KIconLoaderPrivate::removeIconExtension(const QString &name) const -{ - if (name.endsWith(QLatin1String(".png")) // - || name.endsWith(QLatin1String(".xpm")) // - || name.endsWith(QLatin1String(".svg"))) { - return name.left(name.length() - 4); - } else if (name.endsWith(QLatin1String(".svgz"))) { - return name.left(name.length() - 5); - } - - return name; -} - void KIconLoaderPrivate::normalizeIconMetadata(KIconLoader::Group &group, QSize &size, int &state) const { if ((state < 0) || (state >= KIconLoader::LastState)) { @@ -910,7 +946,7 @@ return _name; } - QString name = d->removeIconExtension(_name); + QString name = removeIconExtension(_name); QString path; if (group_or_size == KIconLoader::User) { @@ -1059,7 +1095,7 @@ // we need to honor resource :/ paths and QDir::searchPaths => use QDir::isAbsolutePath, see bug 434451 const bool absolutePath = QDir::isAbsolutePath(name); if (!absolutePath) { - name = d->removeIconExtension(name); + name = removeIconExtension(name); } // Don't bother looking for an icon with no name. @@ -1197,7 +1233,7 @@ #if KICONTHEMES_BUILD_DEPRECATED_SINCE(6, 5) QString KIconLoader::moviePath(const QString &name, KIconLoader::Group group, int size) const { - if (!d->mpGroups) { + if (d->mpGroups.empty()) { return QString(); } @@ -1247,7 +1283,7 @@ { QStringList lst; - if (!d->mpGroups) { + if (d->mpGroups.empty()) { return lst; } @@ -1305,7 +1341,7 @@ int KIconLoader::currentSize(KIconLoader::Group group) const { - if (!d->mpGroups) { + if (d->mpGroups.empty()) { return -1; } @@ -1346,24 +1382,19 @@ themeNode->queryIconsByContext(&result, size, context); } - // Eliminate duplicate entries (same icon in different directories) - QString name; - QStringList res2; - QStringList entries; - for (const auto &icon : std::as_const(result)) { - const int n = icon.lastIndexOf(QLatin1Char('/')); - if (n == -1) { - name = icon; - } else { - name = icon.mid(n + 1); - } - name = d->removeIconExtension(name); - if (!entries.contains(name)) { - entries += name; - res2 += icon; - } + return deduplicateIconsByName(result); +} + +QStringList KIconLoader::queryIcons() const +{ + d->initIconThemes(); + + QStringList result; + for (const auto &themeNode : std::as_const(d->links)) { + result.append(themeNode->queryIcons()); } - return res2; + + return deduplicateIconsByName(result); } QStringList KIconLoader::queryIcons(int group_or_size, KIconLoader::Context context) const @@ -1386,24 +1417,7 @@ themeNode->queryIcons(&result, size, context); } - // Eliminate duplicate entries (same icon in different directories) - QString name; - QStringList res2; - QStringList entries; - for (const auto &icon : std::as_const(result)) { - const int n = icon.lastIndexOf(QLatin1Char('/')); - if (n == -1) { - name = icon; - } else { - name = icon.mid(n + 1); - } - name = d->removeIconExtension(name); - if (!entries.contains(name)) { - entries += name; - res2 += icon; - } - } - return res2; + return deduplicateIconsByName(result); } // used by KIconDialog to find out which contexts to offer in a combobox @@ -1469,12 +1483,10 @@ return d->mCustomColors; } -/*** the global icon loader ***/ -Q_GLOBAL_STATIC(KIconLoader, globalIconLoader) - KIconLoader *KIconLoader::global() { - return globalIconLoader(); + thread_local KIconLoader loader; + return &loader; } void KIconLoader::newIconLoader() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/kiconloader.h new/kiconthemes-6.11.0/src/kiconloader.h --- old/kiconthemes-6.10.0/src/kiconloader.h 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/kiconloader.h 2025-02-07 15:01:26.000000000 +0100 @@ -486,6 +486,12 @@ #endif /** + * Queries all available icons. + * @since 6.11 + */ + [[nodiscard]] QStringList queryIcons() const; + + /** * Queries all available icons for a specific group, having a specific * context. * @param group_or_size If positive, search icons whose size is diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/kiconloader_p.h new/kiconthemes-6.11.0/src/kiconloader_p.h --- old/kiconthemes-6.10.0/src/kiconloader_p.h 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/kiconloader_p.h 2025-02-07 15:01:26.000000000 +0100 @@ -121,12 +121,6 @@ QString unknownIconPath(int size, qreal scale) const; /** - * Checks if name ends in one of the supported icon formats (i.e. .png) - * and returns the name without the extension if it does. - */ - QString removeIconExtension(const QString &name) const; - - /** * @internal * Used with KIconLoader::loadIcon to convert the given name, size, group, * and icon state information to valid states. All parameters except the @@ -193,7 +187,7 @@ KIconLoader *const q; QStringList mThemesInTree; - KIconGroup *mpGroups = nullptr; + std::vector<KIconGroup> mpGroups; KIconThemeNode *mpThemeRoot = nullptr; QStringList searchPaths; #if KICONTHEMES_BUILD_DEPRECATED_SINCE(6, 5) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/kicontheme.cpp new/kiconthemes-6.11.0/src/kicontheme.cpp --- old/kiconthemes-6.10.0/src/kicontheme.cpp 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/kicontheme.cpp 2025-02-07 15:01:26.000000000 +0100 @@ -551,6 +551,16 @@ return context == KIconLoader::Any || context == dir->context(); } +QStringList KIconTheme::queryIcons() const +{ + QStringList result; + const auto listDirs = d->mDirs + d->mScaledDirs; + for (const auto &dir : listDirs) { + result.append(dir->iconList()); + } + return result; +} + QStringList KIconTheme::queryIcons(int size, KIconLoader::Context context) const { // Try to find exact match diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/kicontheme.h new/kiconthemes-6.11.0/src/kicontheme.h --- old/kiconthemes-6.10.0/src/kicontheme.h 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/kicontheme.h 2025-02-07 15:01:26.000000000 +0100 @@ -126,6 +126,13 @@ QList<int> querySizes(KIconLoader::Group group) const; /** + * Query all available icons. + * @return the list of icon names + * @since 6.11 + */ + [[nodiscard]] QStringList queryIcons() const; + + /** * Query available icons for a size and context. * @param size the size of the icons * @param context the context of the icons diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-6.10.0/src/widgets/CMakeLists.txt new/kiconthemes-6.11.0/src/widgets/CMakeLists.txt --- old/kiconthemes-6.10.0/src/widgets/CMakeLists.txt 2025-01-03 16:26:42.000000000 +0100 +++ new/kiconthemes-6.11.0/src/widgets/CMakeLists.txt 2025-02-07 15:01:26.000000000 +0100 @@ -38,7 +38,6 @@ Qt6::Widgets KF6::IconThemes PRIVATE - Qt6::GuiPrivate Qt6::Svg KF6::I18n # for i18n in KIconDialog KF6::ConfigGui # for KStandardActions