diff --git a/libcolorcorrect/compositorcoloradaptor.cpp b/libcolorcorrect/compositorcoloradaptor.cpp index e6fac71e3..8accad679 100644 --- a/libcolorcorrect/compositorcoloradaptor.cpp +++ b/libcolorcorrect/compositorcoloradaptor.cpp @@ -47,7 +47,8 @@ CompositorAdaptor::CompositorAdaptor(QObject *parent) reloadData(); } -void CompositorAdaptor::setError(ErrorCode error) { +void CompositorAdaptor::setError(ErrorCode error) +{ if (m_error == error || m_error == ErrorCode::ErrorCodeXSession) { return; } @@ -90,7 +91,7 @@ if (out != in) { \ emit emitsignal; \ } -void CompositorAdaptor::resetDataAndStaged(QHash data) +void CompositorAdaptor::resetDataAndStaged(const QHash &data) { if (!resetData(data)) { return; @@ -111,7 +112,7 @@ void CompositorAdaptor::resetDataAndStaged(QHash data) emit stagedDataReset(); } -bool CompositorAdaptor::resetData(QHash data) +bool CompositorAdaptor::resetData(const QHash &data) { m_nightColorAvailable = data["Available"].toBool(); diff --git a/libcolorcorrect/compositorcoloradaptor.h b/libcolorcorrect/compositorcoloradaptor.h index e7187013e..77c843651 100644 --- a/libcolorcorrect/compositorcoloradaptor.h +++ b/libcolorcorrect/compositorcoloradaptor.h @@ -277,7 +277,7 @@ public: QTime eveningBeginFixedStaged() const { return m_eveningBeginFixedStaged; } - void setEveningBeginFixedStaged(QTime time) { + void setEveningBeginFixedStaged(const QTime &time) { if (m_eveningBeginFixedStaged == time) { return; } @@ -298,10 +298,10 @@ public: m_transitionTimeStaged = time; emit transitionTimeStagedChanged(); } - QTime morningBeginFixedDefault() { + QTime morningBeginFixedDefault() const { return QTime(6,0,0); } - QTime eveningBeginFixedDefault() { + QTime eveningBeginFixedDefault() const { return QTime(18,0,0); } int transitionTimeDefault() { @@ -428,8 +428,8 @@ Q_SIGNALS: private: - bool resetData(QHash data); - void resetDataAndStaged(QHash data); + bool resetData(const QHash &data); + void resetDataAndStaged(const QHash &data); QDBusInterface *m_iface; QHash getData(); diff --git a/libcolorcorrect/geolocator.cpp b/libcolorcorrect/geolocator.cpp index e89526eab..80b7b2310 100644 --- a/libcolorcorrect/geolocator.cpp +++ b/libcolorcorrect/geolocator.cpp @@ -23,10 +23,10 @@ namespace ColorCorrect Geolocator::Geolocator(QObject *parent) : QObject(parent) { - m_engine = dataEngine("geolocation"); + m_engine = dataEngine(QStringLiteral("geolocation")); if (m_engine && m_engine->isValid()) { - m_engine->connectSource("location", this); + m_engine->connectSource(QStringLiteral("location"), this); } } diff --git a/libcolorcorrect/kded/locationupdater.cpp b/libcolorcorrect/kded/locationupdater.cpp index dc15ab36a..f66d537fe 100644 --- a/libcolorcorrect/kded/locationupdater.cpp +++ b/libcolorcorrect/kded/locationupdater.cpp @@ -54,4 +54,4 @@ void LocationUpdater::sendLocation(double latitude, double longitude) m_adaptor->sendAutoLocationUpdate(latitude, longitude); } -#include +#include "locationupdater.moc"