From 25b4403a264a32a8038fe16bead5a605d94adfaa Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 29 Oct 2016 18:03:12 +0000 Subject: [PATCH] generic: get rid of the QStringBuilder requirement Signed-off-by: Ivailo Monev --- krunner/krunnerdialog.cpp | 2 -- ksmserver/screenlocker/greeter/greeter.cpp | 2 +- kurifilter-plugins/localdomain/localdomainurifilter.cpp | 1 - kwin/effects.cpp | 2 +- kwin/effects/windowgeometry/windowgeometry.cpp | 1 - kwin/workspace.cpp | 8 ++++---- .../protocols/dbussystemtray/dbussystemtraytask.cpp | 2 +- .../plasmacomponents/fullscreenwindow.cpp | 4 ++-- .../plasmaextracomponents/appbackgroundprovider.cpp | 3 +-- plasma/scriptengine/plasmoid/declarativeappletscript.cpp | 2 +- plasma/scriptengine/plasmoid/themedsvg.cpp | 6 +++--- 11 files changed, 14 insertions(+), 19 deletions(-) diff --git a/krunner/krunnerdialog.cpp b/krunner/krunnerdialog.cpp index 656711e3..a55ed9e2 100644 --- a/krunner/krunnerdialog.cpp +++ b/krunner/krunnerdialog.cpp @@ -36,8 +36,6 @@ #include #endif -#include // % operator for QString - #include "kworkspace/kdisplaymanager.h" #include diff --git a/ksmserver/screenlocker/greeter/greeter.cpp b/ksmserver/screenlocker/greeter/greeter.cpp index 4f7815ce..cd8d2cf3 100644 --- a/ksmserver/screenlocker/greeter/greeter.cpp +++ b/ksmserver/screenlocker/greeter/greeter.cpp @@ -216,7 +216,7 @@ void Greeter::initialize() QVariant Greeter::getConf(void *ctx, const char *key, const QVariant &dflt) { Greeter *that = (Greeter *)ctx; - QString fkey = QLatin1String( key ) % QLatin1Char( '=' ); + QString fkey = QLatin1String( key ) + QLatin1Char( '=' ); for (QStringList::ConstIterator it = that->m_pluginOptions.constBegin(); it != that->m_pluginOptions.constEnd(); ++it) if ((*it).startsWith( fkey )) diff --git a/kurifilter-plugins/localdomain/localdomainurifilter.cpp b/kurifilter-plugins/localdomain/localdomainurifilter.cpp index 09be15a4..ce99b592 100644 --- a/kurifilter-plugins/localdomain/localdomainurifilter.cpp +++ b/kurifilter-plugins/localdomain/localdomainurifilter.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #define QL1C(x) QLatin1Char(x) diff --git a/kwin/effects.cpp b/kwin/effects.cpp index 85149573..073c7c1e 100644 --- a/kwin/effects.cpp +++ b/kwin/effects.cpp @@ -1644,7 +1644,7 @@ QString EffectsHandlerImpl::supportInformation(const QString &name) const if (QLatin1String(property.name()) == "objectName") { continue; } - support.append(QLatin1String(property.name()) % ": " % (*it).second->property(property.name()).toString() % '\n'); + support.append(QLatin1String(property.name()) + ": " + (*it).second->property(property.name()).toString() + '\n'); } return support; } diff --git a/kwin/effects/windowgeometry/windowgeometry.cpp b/kwin/effects/windowgeometry/windowgeometry.cpp index 1ded8035..8f52a964 100644 --- a/kwin/effects/windowgeometry/windowgeometry.cpp +++ b/kwin/effects/windowgeometry/windowgeometry.cpp @@ -22,7 +22,6 @@ along with this program. If not, see . // KConfigSkeleton #include "windowgeometryconfig.h" -#include #include #include #include diff --git a/kwin/workspace.cpp b/kwin/workspace.cpp index a1e6ccd9..2a546aaa 100644 --- a/kwin/workspace.cpp +++ b/kwin/workspace.cpp @@ -1282,7 +1282,7 @@ QString Workspace::supportInformation() const if (QLatin1String(property.name()) == "objectName") { continue; } - support.append(QLatin1String(property.name()) % ": " % options->property(property.name()).toString() % '\n'); + support.append(QLatin1String(property.name()) + ": " + options->property(property.name()).toString() + '\n'); } #ifdef KWIN_BUILD_SCREENEDGES support.append("\nScreen Edges\n"); @@ -1293,7 +1293,7 @@ QString Workspace::supportInformation() const if (QLatin1String(property.name()) == "objectName") { continue; } - support.append(QLatin1String(property.name()) % ": " % ScreenEdges::self()->property(property.name()).toString() % '\n'); + support.append(QLatin1String(property.name()) + ": " + ScreenEdges::self()->property(property.name()).toString() + '\n'); } #endif support.append("\nScreens\n"); @@ -1344,12 +1344,12 @@ QString Workspace::supportInformation() const support.append("\nLoaded Effects:\n"); support.append( "---------------\n"); foreach (const QString &effect, static_cast(effects)->loadedEffects()) { - support.append(effect % '\n'); + support.append(effect + '\n'); } support.append("\nCurrently Active Effects:\n"); support.append( "-------------------------\n"); foreach (const QString &effect, static_cast(effects)->activeEffects()) { - support.append(effect % '\n'); + support.append(effect + '\n'); } support.append("\nEffect Settings:\n"); support.append( "----------------\n"); diff --git a/plasma/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp b/plasma/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp index 15c3291e..2473cd81 100644 --- a/plasma/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp +++ b/plasma/applets/systemtray/protocols/dbussystemtray/dbussystemtraytask.cpp @@ -329,7 +329,7 @@ void DBusSystemTrayTask::syncIcons(const Plasma::DataEngine::Data &properties) QStringList tokens = path.split('/', QString::SkipEmptyParts); if (tokens.length() >= 3 && tokens.takeLast() == QLatin1String("icons")) { QString appName = tokens.takeLast(); - QString prefix = QChar('/') % tokens.join("/"); + QString prefix = QChar('/') + tokens.join("/"); // FIXME: Fix KIconLoader and KIconTheme so that we can use // our own instance of KStandardDirs KGlobal::dirs()->addResourceDir("data", prefix); diff --git a/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp b/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp index 0420bd2a..407192b7 100644 --- a/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp +++ b/plasma/declarativeimports/plasmacomponents/fullscreenwindow.cpp @@ -128,12 +128,12 @@ void FullScreenWindow::init(const QString &componentName) const QString target = KDeclarative::componentsTarget(); QString filePath; if (target != KDeclarative::defaultComponentsTarget()) { - const QString file = "platformimports/" % target % "/org/kde/plasma/components/" % componentName % ".qml"; + const QString file = "platformimports/" + target + "/org/kde/plasma/components/" + componentName + ".qml"; filePath = KStandardDirs::locate("module", file); } if (filePath.isEmpty()) { - const QString file = "imports/org/kde/plasma/components/" % componentName % ".qml"; + const QString file = "imports/org/kde/plasma/components/" + componentName + ".qml"; filePath = KStandardDirs::locate("module", file); } diff --git a/plasma/declarativeimports/plasmaextracomponents/appbackgroundprovider.cpp b/plasma/declarativeimports/plasmaextracomponents/appbackgroundprovider.cpp index 36c35636..c98f85d7 100644 --- a/plasma/declarativeimports/plasmaextracomponents/appbackgroundprovider.cpp +++ b/plasma/declarativeimports/plasmaextracomponents/appbackgroundprovider.cpp @@ -19,7 +19,6 @@ #include "appbackgroundprovider_p.h" -#include #include #include @@ -36,7 +35,7 @@ QImage AppBackgroundProvider::requestImage(const QString &id, QSize *size, const { Q_UNUSED(size) Q_UNUSED(requestedSize) - QString search = QLatin1Literal("desktoptheme/") % Plasma::Theme::defaultTheme()->themeName() % QLatin1Literal("/appbackgrounds/") % id % ".png"; + QString search = QLatin1Literal("desktoptheme/") + Plasma::Theme::defaultTheme()->themeName() + QLatin1Literal("/appbackgrounds/") + id + ".png"; search = KStandardDirs::locate("data", search); return QImage(search); } diff --git a/plasma/scriptengine/plasmoid/declarativeappletscript.cpp b/plasma/scriptengine/plasmoid/declarativeappletscript.cpp index 80bc581a..990765cc 100644 --- a/plasma/scriptengine/plasmoid/declarativeappletscript.cpp +++ b/plasma/scriptengine/plasmoid/declarativeappletscript.cpp @@ -83,7 +83,7 @@ bool DeclarativeAppletScript::init() m_declarativeWidget = new Plasma::DeclarativeWidget(applet()); m_declarativeWidget->setInitializationDelayed(true); connect(m_declarativeWidget, SIGNAL(finished()), this, SLOT(qmlCreationFinished())); - KGlobal::locale()->insertCatalog("plasma_applet_" % description().pluginName()); + KGlobal::locale()->insertCatalog("plasma_applet_" + description().pluginName()); //make possible to import extensions from the package //FIXME: probably to be removed, would make possible to use native code from within the package :/ diff --git a/plasma/scriptengine/plasmoid/themedsvg.cpp b/plasma/scriptengine/plasmoid/themedsvg.cpp index f7f47f27..824cfa7a 100644 --- a/plasma/scriptengine/plasmoid/themedsvg.cpp +++ b/plasma/scriptengine/plasmoid/themedsvg.cpp @@ -35,9 +35,9 @@ void ThemedSvg::setThemedImagePath(const QString &path) static QString findLocalSvgFile(AppletInterface *interface, const QString &dir, const QString &file) { - QString path = interface->file(dir, file % QLatin1Literal(".svg")); + QString path = interface->file(dir, file + QLatin1Literal(".svg")); if (path.isEmpty()) { - path = interface->file(dir, file % QLatin1Literal(".svgz")); + path = interface->file(dir, file + QLatin1Literal(".svgz")); } return path; } @@ -61,7 +61,7 @@ QString ThemedSvg::findSvg(QScriptEngine *engine, const QString &file) // FIXME: this isn't particularly helpful, as we can't look in the fallback themes QString themeName = Plasma::Theme::defaultTheme()->themeName(); - path = findLocalSvgFile(interface, "theme", themeName % QLatin1Literal("/") % file); + path = findLocalSvgFile(interface, "theme", themeName + QLatin1Literal("/") + file); if (!path.isEmpty()) { return path; }