Commit 0748bb14 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify

parent bf4a17b0
......@@ -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<QString, QVariant> data)
void CompositorAdaptor::resetDataAndStaged(const QHash<QString, QVariant> &data)
{
if (!resetData(data)) {
return;
......@@ -111,7 +112,7 @@ void CompositorAdaptor::resetDataAndStaged(QHash<QString, QVariant> data)
emit stagedDataReset();
}
bool CompositorAdaptor::resetData(QHash<QString, QVariant> data)
bool CompositorAdaptor::resetData(const QHash<QString, QVariant> &data)
{
m_nightColorAvailable = data["Available"].toBool();
......
......@@ -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<QString, QVariant> data);
void resetDataAndStaged(QHash<QString, QVariant> data);
bool resetData(const QHash<QString, QVariant> &data);
void resetDataAndStaged(const QHash<QString, QVariant> &data);
QDBusInterface *m_iface;
QHash<QString, QVariant> getData();
......
......@@ -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);
}
}
......
......@@ -54,4 +54,4 @@ void LocationUpdater::sendLocation(double latitude, double longitude)
m_adaptor->sendAutoLocationUpdate(latitude, longitude);
}
#include <locationupdater.moc>
#include "locationupdater.moc"
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