Commit cbe0a015 authored by Laurent Montel's avatar Laurent Montel
Browse files

Const'ify variable + use QStringLiteral

parent 08eaada9
Pipeline #151535 passed with stage
in 8 minutes and 35 seconds
......@@ -105,7 +105,7 @@ void CompositorAdaptor::handlePropertiesChanged(const QString &interfaceName, co
void CompositorAdaptor::sendAutoLocationUpdate(double latitude, double longitude)
{
m_iface->call("nightColorAutoLocationUpdate", latitude, longitude);
m_iface->call(QStringLiteral("nightColorAutoLocationUpdate"), latitude, longitude);
}
}
......@@ -15,8 +15,8 @@ K_PLUGIN_CLASS_WITH_JSON(LocationUpdater, "colorcorrectlocationupdater.json")
LocationUpdater::LocationUpdater(QObject *parent, const QList<QVariant> &)
: KDEDModule(parent)
, m_adaptor(new ColorCorrect::CompositorAdaptor(this))
{
m_adaptor = new ColorCorrect::CompositorAdaptor(this);
m_configWatcher = KConfigWatcher::create(KSharedConfig::openConfig(QStringLiteral("kwinrc")));
connect(m_configWatcher.data(), &KConfigWatcher::configChanged, this, &LocationUpdater::resetLocator);
connect(m_adaptor, &ColorCorrect::CompositorAdaptor::runningChanged, this, &LocationUpdater::resetLocator);
......
......@@ -25,7 +25,7 @@ private:
void resetLocator();
void sendLocation(double latitude, double longitude);
ColorCorrect::CompositorAdaptor *m_adaptor = nullptr;
ColorCorrect::CompositorAdaptor *const m_adaptor;
ColorCorrect::Geolocator *m_locator = nullptr;
KConfigWatcher::Ptr m_configWatcher;
};
......@@ -13,7 +13,7 @@ static const auto autostartScriptKey = QStringLiteral("X-KDE-AutostartScript");
QDir AutostartScriptDesktopFile::autostartLocation()
{
return QDir(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)).filePath("autostart");
return QDir(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)).filePath(QStringLiteral("autostart"));
}
AutostartScriptDesktopFile::AutostartScriptDesktopFile(const QString &name, const QString &execPath)
......
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