From cf1d34af113a361fbf2d74a6dc4fffa23f2b0eb3 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Thu, 22 Jan 2015 13:19:41 +0100 Subject: [PATCH] some constnes --- src/core/plugins/plugins.cpp | 2 +- src/core/plugins/plugins.h | 2 +- src/plugins/backends/snore/notifywidget.cpp | 2 +- src/plugins/backends/snore/notifywidget.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/plugins/plugins.cpp b/src/core/plugins/plugins.cpp index f5dc1cb..c4dc247 100644 --- a/src/core/plugins/plugins.cpp +++ b/src/core/plugins/plugins.cpp @@ -67,7 +67,7 @@ SnoreCore *SnorePlugin::snore() return m_snore.data(); } -QVariant SnorePlugin::value(const QString &key) +QVariant SnorePlugin::value(const QString &key) const { return snore()->settings()->value(normaliseKey(key)); } diff --git a/src/core/plugins/plugins.h b/src/core/plugins/plugins.h index 3d0b043..3e4ef01 100644 --- a/src/core/plugins/plugins.h +++ b/src/core/plugins/plugins.h @@ -54,7 +54,7 @@ public: SnoreCore *snore(); const QString &name() const; - QVariant value(const QString &key); + QVariant value(const QString &key) const; void setValue(const QString &key, const QVariant &value); void setDefaultValue(const QString &key, const QVariant &value,const QString &help); diff --git a/src/plugins/backends/snore/notifywidget.cpp b/src/plugins/backends/snore/notifywidget.cpp index 1fe3df6..13bb738 100644 --- a/src/plugins/backends/snore/notifywidget.cpp +++ b/src/plugins/backends/snore/notifywidget.cpp @@ -28,7 +28,7 @@ using namespace Snore; -NotifyWidget::NotifyWidget(int pos, SnoreNotifier *parent) : +NotifyWidget::NotifyWidget(int pos, const SnoreNotifier *parent) : QQuickView(QUrl("qrc:/notification.qml")), m_id(pos), m_parent(parent), diff --git a/src/plugins/backends/snore/notifywidget.h b/src/plugins/backends/snore/notifywidget.h index d4b82e6..af39cce 100644 --- a/src/plugins/backends/snore/notifywidget.h +++ b/src/plugins/backends/snore/notifywidget.h @@ -47,7 +47,7 @@ class NotifyWidget : public QQuickView public: Q_PROPERTY(int id READ id) Q_PROPERTY(Qt::Corner corner READ corner) - explicit NotifyWidget(int pos, SnoreNotifier *parent); + explicit NotifyWidget(int pos, const SnoreNotifier *parent); ~NotifyWidget(); void display(const Snore::Notification ¬ification); @@ -75,7 +75,7 @@ private: Snore::Notification m_notification; QObject *m_qmlNotification; int m_id; - SnoreNotifier *m_parent; + const SnoreNotifier *m_parent; QSharedMemory m_mem; bool m_ready; };