Commit af709790 authored by Alexander Akulich's avatar Alexander Akulich Committed by Albert Vaca Cintora

Added some more const declaration.

Conflicts:
	libkdeconnect/devicesmodel.cpp
	libkdeconnect/devicesmodel.h
	libkdeconnect/notificationsmodel.cpp
	libkdeconnect/notificationsmodel.h
parent 6fff30fc
......@@ -146,7 +146,7 @@ void Daemon::forceOnNetworkChange()
}
}
QStringList Daemon::devices(bool onlyReachable, bool onlyVisible)
QStringList Daemon::devices(bool onlyReachable, bool onlyVisible) const
{
QStringList ret;
Q_FOREACH(Device* device, mDevices) {
......
......@@ -53,7 +53,7 @@ public Q_SLOTS:
Q_SCRIPTABLE void forceOnNetworkChange();
//Returns a list of ids. The respective devices can be manipulated using the dbus path: "/modules/kdeconnect/Devices/"+id
Q_SCRIPTABLE QStringList devices(bool onlyReachable = false, bool onlyVisible = false);
Q_SCRIPTABLE QStringList devices(bool onlyReachable = false, bool onlyVisible = false) const;
Q_SIGNALS:
Q_SCRIPTABLE void deviceAdded(const QString& id);
......
......@@ -173,7 +173,7 @@ QVariant DevicesModel::data(const QModelIndex &index, int role) const
}
}
DeviceDbusInterface* DevicesModel::getDevice(const QModelIndex& index)
DeviceDbusInterface *DevicesModel::getDevice(const QModelIndex &index) const
{
if (!index.isValid()) {
return NULL;
......
......@@ -59,7 +59,7 @@ public:
virtual QVariant data(const QModelIndex &index, int role) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
DeviceDbusInterface* getDevice(const QModelIndex& index);
DeviceDbusInterface *getDevice(const QModelIndex &index) const;
public Q_SLOTS:
void deviceStatusChanged(const QString& id);
......
......@@ -57,7 +57,7 @@ NotificationsModel::~NotificationsModel()
{
}
QString NotificationsModel::deviceId()
QString NotificationsModel::deviceId() const
{
return m_deviceId;
}
......@@ -161,7 +161,7 @@ QVariant NotificationsModel::data(const QModelIndex &index, int role) const
}
}
NotificationDbusInterface* NotificationsModel::getNotification(const QModelIndex& index)
NotificationDbusInterface *NotificationsModel::getNotification(const QModelIndex &index) const
{
if (!index.isValid()) {
return NULL;
......@@ -185,7 +185,7 @@ int NotificationsModel::rowCount(const QModelIndex &parent) const
return m_notificationList.count();
}
bool NotificationsModel::isAnyDimissable()
bool NotificationsModel::isAnyDimissable() const
{
Q_FOREACH(NotificationDbusInterface* notification, m_notificationList) {
if (notification->dismissable()) {
......
......@@ -50,17 +50,17 @@ public:
NotificationsModel(QObject *parent = 0);
virtual ~NotificationsModel();
QString deviceId();
QString deviceId() const;
void setDeviceId(const QString& deviceId);
virtual QVariant data(const QModelIndex &index, int role) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex& index, int role) const;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
NotificationDbusInterface* getNotification(const QModelIndex&);
NotificationDbusInterface* getNotification(const QModelIndex& index) const;
public Q_SLOTS:
void dismissAll();
bool isAnyDimissable();
bool isAnyDimissable() const;
private Q_SLOTS:
void notificationAdded(const QString& id);
......
Markdown is supported
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