Only use proxy signals for Q_PROPERTY NOTIFY

In other cases we can just connect to the signal from the parent class
This commit is contained in:
Albert Vaca Cintora 2023-08-08 20:23:25 +02:00
parent 2cfde60ab9
commit a467247f08
3 changed files with 2 additions and 4 deletions

View file

@ -139,7 +139,7 @@ int main(int argc, char **argv)
#endif
};
QObject::connect(&iface, &DaemonDbusInterface::pairingRequestsChangedProxy, &model, refreshMenu);
QObject::connect(&iface, &DaemonDbusInterface::pairingRequestsChanged, &model, refreshMenu);
QObject::connect(&model, &DevicesModel::rowsInserted, &model, refreshMenu);
QObject::connect(&model, &DevicesModel::rowsRemoved, &model, refreshMenu);

View file

@ -45,8 +45,6 @@ public:
static QString activatedService();
Q_SIGNALS:
void deviceAdded(const QString &id);
void pairingRequestsChangedProxy();
void customDevicesChangedProxy();
};

View file

@ -166,7 +166,7 @@ void KdeConnectKcm::deviceSelected(const QModelIndex &current)
connect(currentDevice, SIGNAL(pluginsChanged()), this, SLOT(resetCurrentDevice()));
connect(currentDevice, SIGNAL(pairingFailed(QString)), this, SLOT(pairingFailed(QString)));
connect(currentDevice, &DeviceDbusInterface::pairStateChangedProxy, this, &KdeConnectKcm::setCurrentDevicePairState);
connect(currentDevice, &DeviceDbusInterface::pairStateChanged, this, &KdeConnectKcm::setCurrentDevicePairState);
}
void KdeConnectKcm::resetCurrentDevice()