Connection syntax migration (#637)

This commit is contained in:
Jonas Kvinge
2021-01-26 16:48:04 +01:00
committed by GitHub
parent d57f6303f4
commit bf7c8df353
362 changed files with 2452 additions and 2434 deletions

View File

@@ -33,9 +33,9 @@ DeviceStateFilterModel::DeviceStateFilterModel(QObject *parent, DeviceManager::S
: QSortFilterProxyModel(parent),
state_(state) {
connect(this, SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(ProxyRowCountChanged(QModelIndex, int, int)));
connect(this, SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(ProxyRowCountChanged(QModelIndex, int, int)));
connect(this, SIGNAL(modelReset()), this, SLOT(ProxyRowCountChanged()));
QObject::connect(this, &DeviceStateFilterModel::rowsInserted, this, &DeviceStateFilterModel::ProxyRowCountChanged);
QObject::connect(this, &DeviceStateFilterModel::rowsRemoved, this, &DeviceStateFilterModel::ProxyRowCountChanged);
QObject::connect(this, &DeviceStateFilterModel::modelReset, this, &DeviceStateFilterModel::ProxyReset);
}
@@ -43,15 +43,14 @@ bool DeviceStateFilterModel::filterAcceptsRow(int row, const QModelIndex&) const
return sourceModel()->index(row, 0).data(DeviceManager::Role_State).toInt() != state_ && sourceModel()->index(row, 0).data(DeviceManager::Role_CopyMusic).toBool();
}
void DeviceStateFilterModel::ProxyRowCountChanged() {
void DeviceStateFilterModel::ProxyRowCountChanged(QModelIndex, int, int) {
emit IsEmptyChanged(rowCount() == 0);
}
void DeviceStateFilterModel::ProxyRowCountChanged(QModelIndex index, int first, int last) {
void DeviceStateFilterModel::ProxyReset() {
Q_UNUSED(index);
Q_UNUSED(first);
Q_UNUSED(last);
emit IsEmptyChanged(rowCount() == 0);
}