Hello community,

here is the log from the commit of package kiconthemes for openSUSE:Factory 
checked in at 2015-06-23 12:08:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kiconthemes (Old)
 and      /work/SRC/openSUSE:Factory/.kiconthemes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kiconthemes"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kiconthemes/kiconthemes.changes  2015-05-11 
19:47:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kiconthemes.new/kiconthemes.changes     
2015-06-23 12:08:45.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Jun  7 19:07:40 UTC 2015 - [email protected]
+
+- Update to 5.11.0
+  * Optimize KIconEngine::availableSizes()
+  * For more details please see:
+    https://www.kde.org/announcements/kde-frameworks-5.11.0.php
+
+-------------------------------------------------------------------

Old:
----
  kiconthemes-5.10.0.tar.xz

New:
----
  kiconthemes-5.11.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kiconthemes.spec ++++++
--- /var/tmp/diff_new_pack.hYezOY/_old  2015-06-23 12:08:45.000000000 +0200
+++ /var/tmp/diff_new_pack.hYezOY/_new  2015-06-23 12:08:45.000000000 +0200
@@ -18,9 +18,9 @@
 
 %bcond_without lang
 %define lname   libKF5IconThemes5
-%define _tar_path 5.10
+%define _tar_path 5.11
 Name:           kiconthemes
-Version:        5.10.0
+Version:        5.11.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  cmake >= 2.8.12

++++++ kiconthemes-5.10.0.tar.xz -> kiconthemes-5.11.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/CMakeLists.txt 
new/kiconthemes-5.11.0/CMakeLists.txt
--- old/kiconthemes-5.10.0/CMakeLists.txt       2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/CMakeLists.txt       2015-06-06 23:18:03.000000000 
+0200
@@ -3,20 +3,24 @@
 project(KIconThemes)
 
 # ECM setup
-find_package(ECM 5.10.0 REQUIRED NO_MODULE)
+include(FeatureSummary)
+find_package(ECM 5.11.0  NO_MODULE)
+set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
+feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
 
 include(KDEInstallDirs)
 include(KDEFrameworkCompilerSettings)
 include(KDECMakeSettings)
-include(FeatureSummary)
+
 include(GenerateExportHeader)
 include(ECMSetupVersion)
 include(ECMGenerateHeaders)
 include(ECMMarkNonGuiExecutable)
 
-set(KF5_VERSION "5.10.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.10.0") # handled by release scripts
+set(KF5_VERSION "5.11.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.11.0") # handled by release scripts
 
 ecm_setup_version(${KF5_VERSION}
                   VARIABLE_PREFIX KICONTHEMES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/po/nb/kiconthemes5.po 
new/kiconthemes-5.11.0/po/nb/kiconthemes5.po
--- old/kiconthemes-5.10.0/po/nb/kiconthemes5.po        2015-05-03 
17:13:51.000000000 +0200
+++ new/kiconthemes-5.11.0/po/nb/kiconthemes5.po        2015-06-06 
23:18:03.000000000 +0200
@@ -1,13 +1,13 @@
 # Translation of kiconthemes5 to Norwegian Bokmål
 #
-# Knut Yrvin <[email protected]>, 2003, 2004, 2005.
+# Knut Yrvin <[email protected]>, 2003, 2004, 2005.
 # Knut Erik Hollund <[email protected]>, 2003.
 # Håvard Korsvoll <[email protected]>, 2003.
 # Bjørn Steensrud <[email protected]>, 2003, 2004, 2007, 2008, 
2009, 2010, 2011, 2012, 2014.
 # Sven Harald Klein Bakke <[email protected]>, 2004.
 # Eskild Hustvedt <[email protected]>, 2005.
 # Jørgen Grønlund <[email protected]>, 2005.
-# Axel Bojer <[email protected]>, 2005, 2006.
+# Axel Bojer <[email protected]>, 2005, 2006.
 # Nils Kristian Tomren <[email protected]>, 2005, 2007.
 # Alexander Nicolaysen Sørnes <[email protected]>, 2006.
 # Øyvind A. Holm <[email protected]>, 2009.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/src/kiconengine.cpp 
new/kiconthemes-5.11.0/src/kiconengine.cpp
--- old/kiconthemes-5.10.0/src/kiconengine.cpp  2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/src/kiconengine.cpp  2015-06-06 23:18:03.000000000 
+0200
@@ -20,7 +20,9 @@
 
 #include <kiconloader.h>
 
+#include <KIconTheme>
 #include <QPainter>
+#include <QSet>
 
 KIconEngine::KIconEngine(const QString &iconName, KIconLoader *iconLoader, 
const QStringList &overlays)
     : mIconName(iconName),
@@ -109,6 +111,8 @@
     return mIconName;
 }
 
+Q_GLOBAL_STATIC_WITH_ARGS(QList<QSize>, sSizes, (QList<QSize>() << QSize(16, 
16) << QSize(22, 22) << QSize(32, 32) << QSize(48, 48) << QSize(64, 64) << 
QSize(128, 128) << QSize(256, 256)));
+
 QList<QSize> KIconEngine::availableSizes(QIcon::Mode mode, QIcon::State state) 
const
 {
     Q_UNUSED(mode);
@@ -118,17 +122,8 @@
         return QList<QSize>();
     }
 
-    if (mIconLoader->iconPath(mIconName, KIconLoader::Desktop, 
KIconLoader::MatchBest).isEmpty()) {
-        return QList<QSize>();
-    }
-
-    return QList<QSize>() << QSize(16, 16)
-           << QSize(22, 22)
-           << QSize(32, 32)
-           << QSize(48, 48)
-           << QSize(64, 64)
-           << QSize(128, 128)
-           << QSize(256, 256);
+    bool found = mIconLoader->hasIcon(iconName());
+    return found ? *sSizes : QList<QSize>();
 }
 
 QString KIconEngine::key() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/src/kiconengine.h 
new/kiconthemes-5.11.0/src/kiconengine.h
--- old/kiconthemes-5.10.0/src/kiconengine.h    2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/src/kiconengine.h    2015-06-06 23:18:03.000000000 
+0200
@@ -75,6 +75,7 @@
     bool write(QDataStream &out) const Q_DECL_OVERRIDE;
 
 private:
+    //TODO KF6: move those into the d-pointer
     QString mIconName;
     QStringList mOverlays;
     QPointer<KIconLoader> mIconLoader;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/src/kiconloader.cpp 
new/kiconthemes-5.11.0/src/kiconloader.cpp
--- old/kiconthemes-5.10.0/src/kiconloader.cpp  2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/src/kiconloader.cpp  2015-06-06 23:18:03.000000000 
+0200
@@ -314,6 +314,8 @@
     QString appname;
 
     void drawOverlays(const KIconLoader *loader, KIconLoader::Group group, int 
state, QPixmap &pix, const QStringList &overlays);
+
+    QSet<QString> mAvailableIcons;
 };
 
 class KIconLoaderGlobalData : public QObject
@@ -461,6 +463,7 @@
 {
     KSharedConfig::openConfig()->reparseConfiguration();
     q->newIconLoader();
+    mAvailableIcons.clear();
     emit q->iconChanged(group);
 }
 
@@ -1621,6 +1624,16 @@
     return pix;
 }
 
+bool KIconLoader::hasIcon(const QString &name) const
+{
+    bool found = d->mAvailableIcons.contains(name);
+    if (!found && !iconPath(name, KIconLoader::Desktop, 
KIconLoader::MatchBest).isEmpty()) {
+        found = true;
+        d->mAvailableIcons.insert(name);
+    }
+    return found;
+}
+
 /*** the global icon loader ***/
 Q_GLOBAL_STATIC(KIconLoader, globalIconLoader)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/src/kiconloader.h 
new/kiconthemes-5.11.0/src/kiconloader.h
--- old/kiconthemes-5.10.0/src/kiconloader.h    2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/src/kiconloader.h    2015-06-06 23:18:03.000000000 
+0200
@@ -454,6 +454,7 @@
      */
     void drawOverlays(const QStringList &overlays, QPixmap &pixmap, 
KIconLoader::Group group, int state = KIconLoader::DefaultState) const;
 
+    bool hasIcon(const QString &iconName) const;
 public Q_SLOTS:
     /**
      * Re-initialize the global icon loader
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiconthemes-5.10.0/src/kicontheme.cpp 
new/kiconthemes-5.11.0/src/kicontheme.cpp
--- old/kiconthemes-5.10.0/src/kicontheme.cpp   2015-05-03 17:13:51.000000000 
+0200
+++ new/kiconthemes-5.11.0/src/kicontheme.cpp   2015-06-06 23:18:03.000000000 
+0200
@@ -38,10 +38,6 @@
 
 #include <kconfiggroup.h>
 
-// The following define exists because the Qt SVG renderer needs
-// to be improved. This will be removed soon. (ereslibre)
-#undef KDE_QT_SVG_RENDERER_FIXED
-
 class KIconTheme::KIconThemePrivate
 {
 public:
@@ -331,12 +327,9 @@
 
 QStringList KIconTheme::queryIcons(int size, KIconLoader::Context context) 
const
 {
-    KIconThemeDir *dir;
-
     // Try to find exact match
     QStringList result;
-    for (int i = 0; i < d->mDirs.size(); ++i) {
-        dir = d->mDirs.at(i);
+    foreach (KIconThemeDir* dir, d->mDirs) {
         if ((context != KIconLoader::Any) && (context != dir->context())) {
             continue;
         }
@@ -384,7 +377,6 @@
 QStringList KIconTheme::queryIconsByContext(int size, KIconLoader::Context 
context) const
 {
     int dw;
-    KIconThemeDir *dir;
 
     // We want all the icons for a given context, but we prefer icons
     // of size size . Note that this may (will) include duplicate icons
@@ -394,8 +386,7 @@
     // 26 (48-22) and 32 (48-16) will be used, but who knows if someone
     // will make icon themes with different icon sizes.
 
-    for (int i = 0; i < d->mDirs.size(); ++i) {
-        dir = d->mDirs.at(i);
+    foreach (KIconThemeDir *dir, d->mDirs) {
         if ((context != KIconLoader::Any) && (context != dir->context())) {
             continue;
         }
@@ -427,9 +418,6 @@
     QString tempPath;      // used to cache icon path if it exists
     int delta = -INT_MAX;  // current icon size delta of 'icon'
     int dw = INT_MAX;      // icon size delta of current directory
-    KIconThemeDir *dir;
-
-    const int dirCount = d->mDirs.size();
 
     // Search the directory that contains the icon which matches best to the 
requested
     // size. If there is no directory which matches exactly to the requested 
size, the
@@ -437,9 +425,7 @@
     // - Take a directory having icons with a minimum difference to the 
requested size.
     // - Prefer directories that allow a downscaling even if the difference to
     //   the requested size is bigger than a directory where an upscaling is 
required.
-    for (int i = 0; i < dirCount; ++i) {
-        dir = d->mDirs.at(i);
-
+    foreach (KIconThemeDir *dir, d->mDirs) {
         if (match == KIconLoader::MatchExact) {
             if ((dir->type() == KIconLoader::Fixed) && (dir->size() != size)) {
                 continue;
@@ -615,15 +601,13 @@
 /*** KIconThemeDir ***/
 
 KIconThemeDir::KIconThemeDir(const QString &basedir, const QString &themedir, 
const KConfigGroup &config)
+    : mbValid(false)
+    , mType(KIconLoader::Fixed)
+    , mSize(config.readEntry("Size", 0))
+    , mMinSize(1)    // just set the variables to something
+    , mMaxSize(50)   // meaningful in case someone calls minSize or maxSize
+    , mBaseDirThemeDir(basedir + themedir)
 {
-    mbValid = false;
-    mBaseDirThemeDir = basedir + themedir;
-
-    mSize = config.readEntry("Size", 0);
-    mMinSize = 1;    // just set the variables to something
-    mMaxSize = 50;   // meaningful in case someone calls minSize or maxSize
-    mType = KIconLoader::Fixed;
-
     if (mSize == 0) {
         return;
     }


Reply via email to