Hello community, here is the log from the commit of package kiconthemes for openSUSE:Factory checked in at 2018-01-22 16:00:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kiconthemes (Old) and /work/SRC/openSUSE:Factory/.kiconthemes.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kiconthemes" Mon Jan 22 16:00:36 2018 rev:52 rq:566681 version:5.42.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kiconthemes/kiconthemes.changes 2018-01-09 14:42:22.702227695 +0100 +++ /work/SRC/openSUSE:Factory/.kiconthemes.new/kiconthemes.changes 2018-01-22 16:00:36.940190710 +0100 @@ -1,0 +2,18 @@ +Tue Jan 16 22:50:17 CET 2018 - [email protected] + +- Update to 5.42.0 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/kde-frameworks-5.42.0.php +- Changes since 5.41.0: + * Remove obsolete reviewboardrc file + * I hope that it fixes build against qt5.7 + * not necessary to add to list of cpp file + * Minor optimization. Remove unused variable. Optimize loop. + * Pedantic + * Port to new connect api + * Use QStringLiteral/QLatin1Char + * Fix some clazy wrning + * Remove extra ';' + +------------------------------------------------------------------- Old: ---- kiconthemes-5.41.0.tar.xz New: ---- kiconthemes-5.42.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiconthemes.spec ++++++ --- /var/tmp/diff_new_pack.bUfo92/_old 2018-01-22 16:00:37.880146722 +0100 +++ /var/tmp/diff_new_pack.bUfo92/_new 2018-01-22 16:00:37.892146161 +0100 @@ -18,13 +18,13 @@ %bcond_without lang %define lname libKF5IconThemes5 -%define _tar_path 5.41 +%define _tar_path 5.42 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} Name: kiconthemes -Version: 5.41.0 +Version: 5.42.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 3.0 ++++++ kiconthemes-5.41.0.tar.xz -> kiconthemes-5.42.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/.reviewboardrc new/kiconthemes-5.42.0/.reviewboardrc --- old/kiconthemes-5.41.0/.reviewboardrc 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/.reviewboardrc 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -REVIEWBOARD_URL = "https://git.reviewboard.kde.org" -REPOSITORY = 'git://anongit.kde.org/kiconthemes' -BRANCH = 'master' -TARGET_GROUPS = 'kdeframeworks' -TARGET_PEOPLE = 'cfeck' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/CMakeLists.txt new/kiconthemes-5.42.0/CMakeLists.txt --- old/kiconthemes-5.41.0/CMakeLists.txt 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/CMakeLists.txt 2018-01-07 17:18:36.000000000 +0100 @@ -1,12 +1,12 @@ cmake_minimum_required(VERSION 3.0) -set(KF5_VERSION "5.41.0") # handled by release scripts -set(KF5_DEP_VERSION "5.41.0") # handled by release scripts +set(KF5_VERSION "5.42.0") # handled by release scripts +set(KF5_DEP_VERSION "5.42.0") # handled by release scripts project(KIconThemes VERSION ${KF5_VERSION}) # ECM setup include(FeatureSummary) -find_package(ECM 5.41.0 NO_MODULE) +find_package(ECM 5.42.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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/autotests/kiconloader_rcctest.cpp new/kiconthemes-5.42.0/autotests/kiconloader_rcctest.cpp --- old/kiconthemes-5.41.0/autotests/kiconloader_rcctest.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/autotests/kiconloader_rcctest.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -35,9 +35,9 @@ { QStandardPaths::enableTestMode(true); qputenv("XDG_DATA_DIRS", "/doesnotexist"); // ensure hicolor/oxygen/breeze are not found - QFile rcc("icontheme.rcc"); + QFile rcc(QStringLiteral("icontheme.rcc")); Q_ASSERT(rcc.exists()); - QCoreApplication::setApplicationName("myappname"); // for a fixed location on Unix (appname is empty here otherwise) + QCoreApplication::setApplicationName(QStringLiteral("myappname")); // for a fixed location on Unix (appname is empty here otherwise) const QString destDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); QDir().mkpath(destDir); const QString dest = destDir + "/icontheme.rcc"; @@ -89,7 +89,7 @@ } private: - const QString m_internalThemeName = "kf5_rcc_theme"; + const QString m_internalThemeName = QStringLiteral("kf5_rcc_theme"); }; QTEST_MAIN(KIconLoader_RCCThemeTest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/po/pt_BR/kiconthemes5.po new/kiconthemes-5.42.0/po/pt_BR/kiconthemes5.po --- old/kiconthemes-5.41.0/po/pt_BR/kiconthemes5.po 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/po/pt_BR/kiconthemes5.po 2018-01-07 17:18:36.000000000 +0100 @@ -10,21 +10,21 @@ # doutor.zero <[email protected]>, 2007. # Diniz Bortolotto <[email protected]>, 2007, 2008. # André Marcelo Alvarenga <[email protected]>, 2008, 2009, 2010, 2011, 2012, 2013, 2014. -# Luiz Fernando Ranghetti <[email protected]>, 2009, 2010, 2012. +# Luiz Fernando Ranghetti <[email protected]>, 2009, 2010, 2012, 2017. msgid "" msgstr "" "Project-Id-Version: kiconthemes5\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2016-11-19 20:11+0100\n" -"PO-Revision-Date: 2014-03-04 21:08-0300\n" -"Last-Translator: André Marcelo Alvarenga <[email protected]>\n" -"Language-Team: Brazilian Portuguese <[email protected]>\n" +"PO-Revision-Date: 2017-12-12 15:52-0300\n" +"Last-Translator: Luiz Fernando Ranghetti <[email protected]>\n" +"Language-Team: Portuguese <[email protected]>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Lokalize 1.5\n" +"X-Generator: Lokalize 2.0\n" #: kicondialog.cpp:260 kicondialog.cpp:272 kicondialog.cpp:602 #, kde-format @@ -109,7 +109,7 @@ #: kicondialog.cpp:364 #, kde-format msgid "All" -msgstr "" +msgstr "Todos" #: kicondialog.cpp:602 #, kde-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/po/zh_CN/kiconthemes5.po new/kiconthemes-5.42.0/po/zh_CN/kiconthemes5.po --- old/kiconthemes-5.41.0/po/zh_CN/kiconthemes5.po 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/po/zh_CN/kiconthemes5.po 2018-01-07 17:18:36.000000000 +0100 @@ -17,7 +17,7 @@ "Project-Id-Version: kdeorg\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2016-11-19 20:11+0100\n" -"PO-Revision-Date: 2017-11-09 08:34-0500\n" +"PO-Revision-Date: 2018-01-05 06:38-0500\n" "Last-Translator: guoyunhebrave <[email protected]>\n" "Language-Team: Chinese Simplified\n" "Language: zh_CN\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/CMakeLists.txt new/kiconthemes-5.42.0/src/CMakeLists.txt --- old/kiconthemes-5.41.0/src/CMakeLists.txt 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/CMakeLists.txt 2018-01-07 17:18:36.000000000 +0100 @@ -10,7 +10,6 @@ kiconengine.cpp kiconloader.cpp kicontheme.cpp - debug.cpp ) qt5_add_resources(kiconthemes_SRCS hicolor.qrc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kiconbutton.cpp new/kiconthemes-5.42.0/src/kiconbutton.cpp --- old/kiconthemes-5.41.0/src/kiconbutton.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kiconbutton.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -71,7 +71,7 @@ mpLoader = loader; mpDialog = nullptr; - connect(q, SIGNAL(clicked()), q, SLOT(_k_slotChangeIcon())); + connect(q, &KIconButton::clicked, q, [this]() {_k_slotChangeIcon();}); } KIconButton::KIconButtonPrivate::~KIconButtonPrivate() @@ -133,7 +133,7 @@ if (!d->mpDialog) { d->mpDialog = new KIconDialog(d->mpLoader, this); - connect(d->mpDialog, SIGNAL(newIconName(QString)), this, SLOT(_k_newIconName(QString))); + connect(d->mpDialog, &KIconDialog::newIconName, this, [this](const QString &iconName) { d->_k_newIconName(iconName); }); } if (d->mbUser) { @@ -161,7 +161,7 @@ { if (!mpDialog) { mpDialog = new KIconDialog(mpLoader, q); - connect(mpDialog, SIGNAL(newIconName(QString)), q, SLOT(_k_newIconName(QString))); + connect(mpDialog, &KIconDialog::newIconName, q, [this](const QString &iconName) { _k_newIconName(iconName); }); } mpDialog->setup(mGroup, mContext, m_bStrictIconSize, iconSize, mbUser); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kiconbutton.h new/kiconthemes-5.42.0/src/kiconbutton.h --- old/kiconthemes-5.41.0/src/kiconbutton.h 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kiconbutton.h 2018-01-07 17:18:36.000000000 +0100 @@ -128,9 +128,6 @@ KIconButtonPrivate *const d; Q_DISABLE_COPY(KIconButton) - - Q_PRIVATE_SLOT(d, void _k_slotChangeIcon()) - Q_PRIVATE_SLOT(d, void _k_newIconName(const QString &)) }; #endif // KICONBUTTON_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kicondialog.cpp new/kiconthemes-5.42.0/src/kicondialog.cpp --- old/kiconthemes-5.41.0/src/kicondialog.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kicondialog.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -44,12 +44,12 @@ { public: KIconCanvasDelegate(KIconCanvas *parent, QAbstractItemDelegate *defaultDelegate); - ~KIconCanvasDelegate() {}; + ~KIconCanvasDelegate() {} void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE; private: - KIconCanvas *m_iconCanvas; - QAbstractItemDelegate *m_defaultDelegate; + KIconCanvas *m_iconCanvas = nullptr; + QAbstractItemDelegate *m_defaultDelegate = nullptr; static const int HORIZONTAL_EDGE_PAD = 3; }; @@ -232,8 +232,8 @@ class ShowEventFilter : public QObject { public: - explicit ShowEventFilter(QObject *parent) : QObject(parent) {}; - virtual ~ShowEventFilter() {}; + explicit ShowEventFilter(QObject *parent) : QObject(parent) {} + virtual ~ShowEventFilter() {} private: bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE @@ -415,8 +415,8 @@ static bool sortByFileName(const QString &path1, const QString &path2) { - const QString fileName1 = path1.mid(path1.lastIndexOf('/') + 1); - const QString fileName2 = path2.mid(path1.lastIndexOf('/') + 1); + const QString fileName1 = path1.mid(path1.lastIndexOf(QLatin1Char('/')) + 1); + const QString fileName2 = path2.mid(path1.lastIndexOf(QLatin1Char('/')) + 1); return QString::compare(fileName1, fileName2, Qt::CaseInsensitive) < 0; } @@ -436,9 +436,9 @@ // List PNG files found directly in the kiconload search paths. Q_FOREACH (const QString &relDir, KIconLoader::global()->searchPaths()) { const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, relDir, QStandardPaths::LocateDirectory); - Q_FOREACH (const QString &dir, dirs) { - Q_FOREACH (const QString &fileName, QDir(dir).entryList(QStringList() << "*.png")) { - filelist << dir + '/' + fileName; + for (const QString &dir : dirs) { + Q_FOREACH (const QString &fileName, QDir(dir).entryList(QStringList() << QLatin1String("*.png"))) { + filelist << dir + QLatin1Char('/') + fileName; } } } @@ -541,7 +541,7 @@ return d->custom; } - QString name = d->mpCanvas->getCurrent(); + const QString name = d->mpCanvas->getCurrent(); if (name.isEmpty() || d->mpOtherIcons->isChecked()) { return name; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kiconeffect.cpp new/kiconthemes-5.42.0/src/kiconeffect.cpp --- old/kiconthemes-5.41.0/src/kiconeffect.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kiconeffect.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -106,9 +106,9 @@ d->color2[i][1] = QColor(0, 0, 0); d->color2[i][2] = QColor(0, 0, 0); - KConfigGroup cg(config, *it + "Icons"); + KConfigGroup cg(config, *it + QStringLiteral("Icons")); for (it2 = states.constBegin(), j = 0; it2 != states.constEnd(); ++it2, ++j) { - QString tmp = cg.readEntry(*it2 + "Effect", QString()); + QString tmp = cg.readEntry(*it2 + QStringLiteral("Effect"), QString()); if (tmp == _togray) { effect = ToGray; } else if (tmp == _colorize) { @@ -127,10 +127,10 @@ if (effect != -1) { d->effect[i][j] = effect; } - d->value[i][j] = cg.readEntry(*it2 + "Value", 0.0); - d->color[i][j] = cg.readEntry(*it2 + "Color", QColor()); - d->color2[i][j] = cg.readEntry(*it2 + "Color2", QColor()); - d->trans[i][j] = cg.readEntry(*it2 + "SemiTransparent", false); + d->value[i][j] = cg.readEntry(*it2 + QStringLiteral("Value"), 0.0); + d->color[i][j] = cg.readEntry(*it2 + QStringLiteral("Color"), QColor()); + d->color2[i][j] = cg.readEntry(*it2 + QStringLiteral("Color2"), QColor()); + d->trans[i][j] = cg.readEntry(*it2 + QStringLiteral("SemiTransparent"), false); } } @@ -157,17 +157,17 @@ if (cached.isEmpty()) { QString tmp; cached = tmp.setNum(d->effect[group][state]); - cached += ':'; + cached += QLatin1Char(':'); cached += tmp.setNum(d->value[group][state]); - cached += ':'; + cached += QLatin1Char(':'); cached += d->trans[group][state] ? QLatin1String("trans") : QLatin1String("notrans"); if (d->effect[group][state] == Colorize || d->effect[group][state] == ToMonochrome) { - cached += ':'; + cached += QLatin1Char(':'); cached += d->color[group][state].name(); } if (d->effect[group][state] == ToMonochrome) { - cached += ':'; + cached += QLatin1Char(':'); cached += d->color2[group][state].name(); } @@ -719,7 +719,5 @@ } } } - - return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kiconloader.cpp new/kiconthemes-5.42.0/src/kiconloader.cpp --- old/kiconthemes-5.41.0/src/kiconloader.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kiconloader.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -101,7 +101,7 @@ static bool pathIsRelative(const QString &path) { #ifdef Q_OS_UNIX - return (!path.isEmpty() && path[0] != QChar('/')); + return (!path.isEmpty() && path[0] != QLatin1Char('/')); #else return QDir::isRelativePath(path); #endif @@ -412,7 +412,7 @@ { const QStringList genericIconsFiles = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("mime/generic-icons")); //qCDebug(KICONTHEMES) << genericIconsFiles; - Q_FOREACH (const QString &file, genericIconsFiles) { + for (const QString &file : genericIconsFiles) { parseGenericIconsFiles(file); } @@ -448,10 +448,10 @@ stream.setCodec("ISO 8859-1"); while (!stream.atEnd()) { const QString line = stream.readLine(); - if (line.isEmpty() || line[0] == '#') { + if (line.isEmpty() || line[0] == QLatin1Char('#')) { continue; } - const int pos = line.indexOf(':'); + const int pos = line.indexOf(QLatin1Char(':')); if (pos == -1) { // syntax error continue; } @@ -612,7 +612,7 @@ break; } - KConfigGroup cg(config, QLatin1String(groups[i]) + "Icons"); + KConfigGroup cg(config, QLatin1String(groups[i]) + QStringLiteral("Icons")); mpGroups[i].size = cg.readEntry("Size", 0); if (!mpGroups[i].size && defaultSizesTheme) { @@ -649,7 +649,7 @@ addBaseThemes(mpThemeRoot, appname); // Insert application specific themes at the top. - searchPaths.append(appname + "/pics"); + searchPaths.append(appname + QStringLiteral("/pics")); // Add legacy icon dirs. searchPaths.append(QStringLiteral("icons")); // was xdgdata-icon in KStandardDirs @@ -673,7 +673,7 @@ { d->initIconThemes(); - d->searchPaths.append(appname + "/pics"); + d->searchPaths.append(appname + QStringLiteral("/pics")); d->addAppThemes(appname, themeBaseDir); } @@ -722,7 +722,7 @@ { const QStringList lst = node->theme->inherits(); - for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) { + for (QStringList::ConstIterator it = lst.begin(), total = lst.end(); it != total; ++it) { if ((*it) == QLatin1String("hicolor")) { // The icon theme spec says that "hicolor" must be the very last // of all inherited themes, so don't add it here but at the very end @@ -759,18 +759,16 @@ QStringList list; const QStringList icnlibs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("icons"), QStandardPaths::LocateDirectory); - QStringList::ConstIterator it; char buf[1000]; - for (it = icnlibs.begin(); it != icnlibs.end(); ++it) { + for (QStringList::ConstIterator it = icnlibs.begin(), total = icnlibs.end(); it != total; ++it) { QDir dir(*it); if (!dir.exists()) { continue; } const QStringList lst = dir.entryList(QStringList(QStringLiteral("default.*")), QDir::Dirs); - QStringList::ConstIterator it2; - for (it2 = lst.begin(); it2 != lst.end(); ++it2) { - if (!QFileInfo::exists(*it + *it2 + "/index.desktop") - && !QFileInfo::exists(*it + *it2 + "/index.theme")) { + for (QStringList::ConstIterator it2 = lst.begin(), total = lst.end(); it2 != total; ++it2) { + if (!QFileInfo::exists(*it + *it2 + QStringLiteral("/index.desktop")) + && !QFileInfo::exists(*it + *it2 + QStringLiteral("/index.theme"))) { continue; } //TODO: Is any special handling required for NTFS symlinks? @@ -789,7 +787,7 @@ } } - for (it = list.constBegin(); it != list.constEnd(); ++it) { + for (QStringList::ConstIterator it = list.constBegin(), total = list.constEnd(); it != total; ++it) { // Don't add the KDE defaults once more, we have them anyways. if (*it == QLatin1String("default.kde") || *it == QLatin1String("default.kde4")) { @@ -907,7 +905,7 @@ if (reader.readNext() == QXmlStreamReader::StartElement && reader.qualifiedName() == QLatin1String("style") && reader.attributes().value(QLatin1String("id")) == QLatin1String("current-color-scheme")) { - writer.writeStartElement(QLatin1String("style")); + writer.writeStartElement(QStringLiteral("style")); writer.writeAttributes(reader.attributes()); writer.writeCharacters(styleSheet); writer.writeEndElement(); @@ -1087,7 +1085,7 @@ break; } - int rindex = currentName.lastIndexOf('-'); + int rindex = currentName.lastIndexOf(QLatin1Char('-')); if (rindex > 1) { // > 1 so that we don't split x-content or x-epoc currentName.truncate(rindex); @@ -1139,7 +1137,7 @@ QString KIconLoaderPrivate::locate(const QString &fileName) { Q_FOREACH (const QString &dir, searchPaths) { - const QString path = dir + '/' + fileName; + const QString path = dir + QLatin1Char('/') + fileName; if (QDir(dir).isAbsolute()) { if (QFileInfo::exists(path)) { return path; @@ -1267,7 +1265,7 @@ // Special case for absolute path icons. if (name.startsWith(QLatin1String("favicons/"))) { favIconOverlay = true; - name = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + '/' + name + ".png"; + name = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1Char('/') + name + QStringLiteral(".png"); } bool absolutePath = !pathIsRelative(name); @@ -1393,8 +1391,8 @@ if (file.isEmpty()) { return nullptr; } - int dirLen = file.lastIndexOf('/'); - QString icon = iconPath(name, size ? -size : group, true); + int dirLen = file.lastIndexOf(QLatin1Char('/')); + const QString icon = iconPath(name, size ? -size : group, true); if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen)) { return nullptr; } @@ -1423,7 +1421,7 @@ group = KIconLoader::Desktop; } - QString file = name + ".mng"; + QString file = name + QStringLiteral(".mng"); if (group == KIconLoader::User) { file = d->locate(file); } else { @@ -1473,9 +1471,9 @@ group = KIconLoader::Desktop; } - QString file = name + "/0001"; + QString file = name + QStringLiteral("/0001"); if (group == KIconLoader::User) { - file = d->locate(file + ".png"); + file = d->locate(file + QStringLiteral(".png")); } else { if (size == 0) { size = d->mpGroups[group].size; @@ -1531,9 +1529,8 @@ const QStringList formats = QStringList() << QStringLiteral("*.png") << QStringLiteral("*.xpm") << QStringLiteral("*.svg") << QStringLiteral("*.svgz"); const QStringList lst = dir.entryList(formats, QDir::Files); QStringList result; - QStringList::ConstIterator it; - for (it = lst.begin(); it != lst.end(); ++it) { - result += iconsDir + '/' + *it; + for (QStringList::ConstIterator it = lst.begin(), total = lst.end(); it != total; ++it) { + result += iconsDir + QLatin1Char('/') + *it; } return result; } @@ -1564,7 +1561,7 @@ QStringList res2, entries; QStringList::ConstIterator it; for (it = result.constBegin(); it != result.constEnd(); ++it) { - int n = (*it).lastIndexOf('/'); + int n = (*it).lastIndexOf(QLatin1Char('/')); if (n == -1) { name = *it; } else { @@ -1605,7 +1602,7 @@ QStringList res2, entries; QStringList::ConstIterator it; for (it = result.constBegin(); it != result.constEnd(); ++it) { - int n = (*it).lastIndexOf('/'); + int n = (*it).lastIndexOf(QLatin1Char('/')); if (n == -1) { name = *it; } else { @@ -1757,7 +1754,7 @@ return pix; } - QString path = global()->iconPath(QStringLiteral("unknown"), KIconLoader::Small, true); //krazy:exclude=iconnames + const QString path = global()->iconPath(QStringLiteral("unknown"), KIconLoader::Small, true); //krazy:exclude=iconnames if (path.isEmpty()) { qCDebug(KICONTHEMES) << "Warning: Cannot find \"unknown\" icon."; pix = QPixmap(32, 32); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiconthemes-5.41.0/src/kicontheme.cpp new/kiconthemes-5.42.0/src/kicontheme.cpp --- old/kiconthemes-5.41.0/src/kicontheme.cpp 2017-12-02 21:05:21.000000000 +0100 +++ new/kiconthemes-5.42.0/src/kicontheme.cpp 2018-01-07 17:18:36.000000000 +0100 @@ -106,7 +106,7 @@ QStringList iconList() const; QString constructFileName(const QString &file) const { - return mBaseDir + mThemeDir + '/' + file; + return mBaseDir + mThemeDir + QLatin1Char('/') + file; } KIconLoader::Context context() const @@ -162,8 +162,8 @@ if (!appName.isEmpty() && (name == defaultThemeName() || name == QLatin1String("hicolor") || name == QLatin1String("locolor"))) { const QStringList icnlibs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); - for (QStringList::ConstIterator it = icnlibs.constBegin(); it != icnlibs.constEnd(); ++it) { - const QString cDir = *it + '/' + appName + "/icons/" + name + '/'; + for (QStringList::ConstIterator it = icnlibs.constBegin(), total = icnlibs.constEnd(); it != total; ++it) { + const QString cDir = *it + QLatin1Char('/') + appName + QStringLiteral("/icons/") + name + QLatin1Char('/'); if (QFileInfo::exists(cDir)) { themeDirs += cDir; } @@ -171,7 +171,7 @@ if (!basePathHint.isEmpty()) { // Checks for dir existing are done below - themeDirs += basePathHint + '/' + name + '/'; + themeDirs += basePathHint + QLatin1Char('/') + name + QLatin1Char('/'); } } @@ -188,18 +188,18 @@ icnlibs += QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("pixmaps"), QStandardPaths::LocateDirectory); QString fileName, mainSection; - for (QStringList::ConstIterator it = icnlibs.constBegin(); it != icnlibs.constEnd(); ++it) { - const QString cDir = *it + '/' + name + '/'; + for (QStringList::ConstIterator it = icnlibs.constBegin(), total = icnlibs.constEnd(); it != total; ++it) { + const QString cDir = *it + QLatin1Char('/') + name + QLatin1Char('/'); if (QDir(cDir).exists()) { themeDirs += cDir; if (d->mDir.isEmpty()) { - if (QFileInfo::exists(cDir + "index.theme")) { + if (QFileInfo::exists(cDir + QStringLiteral("index.theme"))) { d->mDir = cDir; - fileName = d->mDir + "index.theme"; + fileName = d->mDir + QStringLiteral("index.theme"); mainSection = QStringLiteral("Icon Theme"); - } else if (QFileInfo::exists(cDir + "index.desktop")) { + } else if (QFileInfo::exists(cDir + QStringLiteral("index.desktop"))) { d->mDir = cDir; - fileName = d->mDir + "index.desktop"; + fileName = d->mDir + QStringLiteral("index.desktop"); mainSection = QStringLiteral("KDE Icon Theme"); } } @@ -221,7 +221,7 @@ d->mDepth = cfg.readEntry("DisplayDepth", 32); d->mInherits = cfg.readEntry("Inherits", QStringList()); if (name != defaultThemeName()) { - for (QStringList::Iterator it = d->mInherits.begin(); it != d->mInherits.end(); ++it) { + for (QStringList::Iterator it = d->mInherits.begin(), total = d->mInherits.end(); it != total; ++it) { if (*it == QLatin1String("default")) { *it = defaultThemeName(); } @@ -232,20 +232,20 @@ d->followsColorScheme = cfg.readEntry("FollowsColorScheme", false); d->example = cfg.readPathEntry("Example", QString()); d->screenshot = cfg.readPathEntry("ScreenShot", QString()); - d->mExtensions = cfg.readEntry("KDE-Extensions", QStringList{ ".png", ".svgz", ".svg", ".xpm" }); + d->mExtensions = cfg.readEntry("KDE-Extensions", QStringList{ QStringLiteral(".png"), QStringLiteral(".svgz"), QStringLiteral(".svg"), QStringLiteral(".xpm") }); const QStringList dirs = cfg.readPathEntry("Directories", QStringList()); for (QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) { KConfigGroup cg(d->sharedConfig, *it); for (QStringList::ConstIterator itDir = themeDirs.constBegin(); itDir != themeDirs.constEnd(); ++itDir) { - const QString currentDir(*itDir + *it + '/'); + const QString currentDir(*itDir + *it + QLatin1Char('/')); if (!addedDirs.contains(currentDir) && QDir(currentDir).exists()) { addedDirs.insert(currentDir); KIconThemeDir *dir = new KIconThemeDir(*itDir, *it, cg); - if (!dir->isValid()) { - delete dir; - } else { + if (dir->isValid()) { d->mDirs.append(dir); + } else { + delete dir; } } } @@ -262,8 +262,8 @@ KConfigGroup cg(d->sharedConfig, mainSection); for (int i = 0; i < groups.size(); ++i) { const QString group = groups.at(i); - d->mDefSize[i] = cg.readEntry(group + "Default", defDefSizes[i]); - d->mSizes[i] = cg.readEntry(group + "Sizes", QList<int>()); + d->mDefSize[i] = cg.readEntry(group + QStringLiteral("Default"), defDefSizes[i]); + d->mSizes[i] = cg.readEntry(group + QStringLiteral("Sizes"), QList<int>()); } } @@ -584,8 +584,7 @@ Q_FOREACH (const QString &it, icnlibs) { QDir dir(it); const QStringList lst = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); - QStringList::ConstIterator it2; - for (it2 = lst.begin(); it2 != lst.end(); ++it2) { + for (QStringList::ConstIterator it2 = lst.begin(), total = lst.end(); it2 != total; ++it2) { if ((*it2).startsWith(QLatin1String("default."))) { continue; } @@ -745,8 +744,7 @@ QStringList result; result.reserve(lst.size()); - QStringList::ConstIterator it; - foreach(const QString &file, lst) { + for (const QString &file : lst) { result += constructFileName(file); } return result;
