mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: get rid of the QStringBuilder requirement
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
9ba24ae20d
commit
25b4403a26
11 changed files with 14 additions and 19 deletions
|
@ -36,8 +36,6 @@
|
|||
#include <NETRootInfo>
|
||||
#endif
|
||||
|
||||
#include <QtCore/QStringBuilder> // % operator for QString
|
||||
|
||||
#include "kworkspace/kdisplaymanager.h"
|
||||
|
||||
#include <Plasma/AbstractRunner>
|
||||
|
|
|
@ -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 ))
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <KDebug>
|
||||
#include <KPluginFactory>
|
||||
|
||||
#include <QtCore/QStringBuilder>
|
||||
#include <QtNetwork/QHostInfo>
|
||||
|
||||
#define QL1C(x) QLatin1Char(x)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// KConfigSkeleton
|
||||
#include "windowgeometryconfig.h"
|
||||
|
||||
#include <QStringBuilder>
|
||||
#include <kconfiggroup.h>
|
||||
#include <kwindowsystem.h>
|
||||
#include <KActionCollection>
|
||||
|
|
|
@ -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<EffectsHandlerImpl*>(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<EffectsHandlerImpl*>(effects)->activeEffects()) {
|
||||
support.append(effect % '\n');
|
||||
support.append(effect + '\n');
|
||||
}
|
||||
support.append("\nEffect Settings:\n");
|
||||
support.append( "----------------\n");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "appbackgroundprovider_p.h"
|
||||
|
||||
#include <QtCore/qstringbuilder.h>
|
||||
#include <QPixmap>
|
||||
#include <QSize>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 :/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue