Add missing NOTIFY to properties
This commit is contained in:
parent
4fa2e93246
commit
dd4831f823
7 changed files with 14 additions and 3 deletions
|
@ -140,6 +140,8 @@ void KdeConnectPluginConfig::setDeviceId(const QString &deviceId)
|
|||
if (!m_deviceId.isEmpty() && !m_pluginName.isEmpty()) {
|
||||
loadConfig();
|
||||
}
|
||||
|
||||
Q_EMIT deviceIdChanged(deviceId);
|
||||
}
|
||||
|
||||
QString KdeConnectPluginConfig::deviceId()
|
||||
|
|
|
@ -21,7 +21,7 @@ class KDECONNECTCORE_EXPORT KdeConnectPluginConfig : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY configChanged)
|
||||
Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged)
|
||||
Q_PROPERTY(QString pluginName READ pluginName WRITE setPluginName NOTIFY configChanged)
|
||||
|
||||
public:
|
||||
|
@ -61,6 +61,7 @@ private Q_SLOTS:
|
|||
|
||||
Q_SIGNALS:
|
||||
void configChanged();
|
||||
void deviceIdChanged(const QString &value);
|
||||
|
||||
private:
|
||||
void loadConfig();
|
||||
|
|
|
@ -132,6 +132,8 @@ void DevicesModel::setDisplayFilter(int flags)
|
|||
m_displayFilter = (StatusFilterFlag)flags;
|
||||
|
||||
refreshDeviceList();
|
||||
|
||||
Q_EMIT displayFilterChanged(flags);
|
||||
}
|
||||
|
||||
void DevicesModel::refreshDeviceList()
|
||||
|
|
|
@ -20,7 +20,7 @@ class DeviceDbusInterface;
|
|||
class KDECONNECTINTERFACES_EXPORT DevicesModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int displayFilter READ displayFilter WRITE setDisplayFilter)
|
||||
Q_PROPERTY(int displayFilter READ displayFilter WRITE setDisplayFilter NOTIFY displayFilterChanged)
|
||||
Q_PROPERTY(int count READ rowCount NOTIFY rowsChanged)
|
||||
|
||||
public:
|
||||
|
@ -68,6 +68,7 @@ private Q_SLOTS:
|
|||
|
||||
Q_SIGNALS:
|
||||
void rowsChanged();
|
||||
void displayFilterChanged(int value);
|
||||
|
||||
private:
|
||||
void clearDevices();
|
||||
|
|
|
@ -34,6 +34,8 @@ void PluginModel::setDeviceId(const QString &deviceId)
|
|||
m_deviceId = deviceId;
|
||||
DeviceDbusInterface *device = new DeviceDbusInterface(m_deviceId);
|
||||
m_config = KSharedConfig::openConfig(device->pluginsConfigFile());
|
||||
|
||||
Q_EMIT deviceIdChanged(deviceId);
|
||||
}
|
||||
|
||||
QVariant PluginModel::data(const QModelIndex &index, int role) const
|
||||
|
|
|
@ -81,6 +81,8 @@ void ConversationModel::setDeviceId(const QString &deviceId)
|
|||
|
||||
// Clear any previous data on device change
|
||||
m_thumbnailsProvider->clear();
|
||||
|
||||
Q_EMIT deviceIdChanged(deviceId);
|
||||
}
|
||||
|
||||
void ConversationModel::setAddressList(const QList<ConversationAddress> &addressList)
|
||||
|
|
|
@ -21,7 +21,7 @@ class ConversationModel : public QStandardItemModel
|
|||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(qint64 threadId READ threadId WRITE setThreadId)
|
||||
Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId)
|
||||
Q_PROPERTY(QString deviceId READ deviceId WRITE setDeviceId NOTIFY deviceIdChanged)
|
||||
Q_PROPERTY(QList<ConversationAddress> addressList READ addressList WRITE setAddressList)
|
||||
|
||||
public:
|
||||
|
@ -64,6 +64,7 @@ public:
|
|||
Q_SIGNALS:
|
||||
void loadingFinished();
|
||||
void filePathReceived(QString filePath, QString fileName);
|
||||
void deviceIdChanged(const QString &value);
|
||||
|
||||
private Q_SLOTS:
|
||||
void handleConversationUpdate(const QDBusVariant &message);
|
||||
|
|
Loading…
Reference in a new issue