Commit 640242a4 authored by Laurent Montel's avatar Laurent Montel
Browse files

const'ify + fix clazy warnings

parent 5fbe1eab
Pipeline #149893 passed with stage
in 5 minutes and 42 seconds
......@@ -34,7 +34,7 @@ int main(int argc, char **argv)
const QString locale1Service = QStringLiteral("org.freedesktop.locale1");
const QString locale1Path = QStringLiteral("/org/freedesktop/locale1");
QDBusMessage message =
QDBusMessage::createMethodCall(locale1Service, locale1Path, QStringLiteral("org.freedesktop.DBus.Properties"), QLatin1String("GetAll"));
QDBusMessage::createMethodCall(locale1Service, locale1Path, QStringLiteral("org.freedesktop.DBus.Properties"), QStringLiteral("GetAll"));
message << locale1Service;
QDBusMessage resultMessage = QDBusConnection::systemBus().call(message);
if (resultMessage.type() == QDBusMessage::ReplyMessage) {
......
......@@ -80,7 +80,7 @@ void StatusNotifierWatcher::serviceUnregistered(const QString &name)
qDebug() << "Service " << name << "unregistered";
m_serviceWatcher->removeWatchedService(name);
QString match = name + QLatin1Char('/');
const QString match = name + QLatin1Char('/');
QStringList::Iterator it = m_registeredServices.begin();
while (it != m_registeredServices.end()) {
if (it->startsWith(match)) {
......
......@@ -313,7 +313,7 @@ void Image::useSingleImageDefaults()
if (m_wallpaper.isEmpty()) {
Plasma::Theme theme;
m_wallpaper = theme.wallpaperPath();
int index = m_wallpaper.indexOf(QString::fromLatin1("/contents/images/"));
int index = m_wallpaper.indexOf(QLatin1String("/contents/images/"));
if (index > -1) { // We have file from package -> get path to package
m_wallpaper = m_wallpaper.left(index);
}
......
......@@ -74,7 +74,10 @@ int main(int argc, char **argv)
<< "d.currentConfigGroup = ['Wallpaper', 'org.kde.image', 'General'];"
<< "d.writeConfig('Image', 'file://" + wallpaperFile + "');"
<< "}";
auto message = QDBusMessage::createMethodCall("org.kde.plasmashell", "/PlasmaShell", "org.kde.PlasmaShell", "evaluateScript");
auto message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.plasmashell"),
QStringLiteral("/PlasmaShell"),
QStringLiteral("org.kde.PlasmaShell"),
QStringLiteral("evaluateScript"));
message.setArguments(QVariantList() << QVariant(script));
auto reply = QDBusConnection::sessionBus().call(message);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment