Added some more const declaration.
Conflicts: libkdeconnect/devicesmodel.cpp libkdeconnect/devicesmodel.h libkdeconnect/notificationsmodel.cpp libkdeconnect/notificationsmodel.h
This commit is contained in:
parent
8e761a7b7f
commit
aeefc32c9b
6 changed files with 12 additions and 12 deletions
|
@ -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) {
|
||||
|
|
|
@ -52,7 +52,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);
|
||||
|
|
Loading…
Reference in a new issue