Commit 74b4a26d authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

clazy: Fix incorrect emit keyword usage

parent befcc738
......@@ -515,7 +515,7 @@ void Positioner::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex
void Positioner::sourceModelAboutToBeReset()
{
emit beginResetModel();
beginResetModel();
}
void Positioner::sourceModelReset()
......@@ -524,7 +524,7 @@ void Positioner::sourceModelReset()
initMaps();
}
emit endResetModel();
endResetModel();
}
void Positioner::sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
......@@ -585,7 +585,7 @@ void Positioner::sourceRowsAboutToBeInserted(const QModelIndex &parent, int star
m_ignoreNextTransaction = true;
}
} else {
emit beginInsertRows(parent, start, end);
beginInsertRows(parent, start, end);
beginInsertRows(parent, start, end);
m_beginInsertRowsCalled = true;
}
......@@ -597,7 +597,7 @@ void Positioner::sourceRowsAboutToBeMoved(const QModelIndex &sourceParent,
const QModelIndex &destinationParent,
int destinationRow)
{
emit beginMoveRows(sourceParent, sourceStart, sourceEnd, destinationParent, destinationRow);
beginMoveRows(sourceParent, sourceStart, sourceEnd, destinationParent, destinationRow);
}
void Positioner::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last)
......@@ -640,7 +640,7 @@ void Positioner::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int first
m_ignoreNextTransaction = true;
}
} else {
emit beginRemoveRows(parent, first, last);
beginRemoveRows(parent, first, last);
}
}
......@@ -683,7 +683,7 @@ void Positioner::sourceRowsMoved(const QModelIndex &sourceParent, int sourceStar
Q_UNUSED(destinationParent)
Q_UNUSED(destinationRow)
emit endMoveRows();
endMoveRows();
}
void Positioner::sourceRowsRemoved(const QModelIndex &parent, int first, int last)
......
......@@ -423,19 +423,19 @@ void SortedActivitiesModel::onCurrentActivityChanged(const QString &currentActiv
return;
const int previousActivityRow = rowForActivityId(m_previousActivity);
emit rowChanged(previousActivityRow, {LastTimeUsed, LastTimeUsedString});
rowChanged(previousActivityRow, {LastTimeUsed, LastTimeUsedString});
m_previousActivity = currentActivity;
const int currentActivityRow = rowForActivityId(m_previousActivity);
emit rowChanged(currentActivityRow, {LastTimeUsed, LastTimeUsedString});
rowChanged(currentActivityRow, {LastTimeUsed, LastTimeUsedString});
}
void SortedActivitiesModel::onBackgroundsUpdated(const QStringList &activities)
{
for (const auto &activity : activities) {
const int row = rowForActivityId(activity);
emit rowChanged(row, {KActivities::ActivitiesModel::ActivityBackground});
rowChanged(row, {KActivities::ActivitiesModel::ActivityBackground});
}
}
......
......@@ -144,7 +144,7 @@ void BlacklistedApplicationsModel::defaults()
d->applications[i].blocked = false;
}
dataChanged(QAbstractListModel::index(0), QAbstractListModel::index(rowCount() - 1));
Q_EMIT dataChanged(QAbstractListModel::index(0), QAbstractListModel::index(rowCount() - 1));
emit defaulted(true);
}
......@@ -156,7 +156,7 @@ void BlacklistedApplicationsModel::toggleApplicationBlocked(int index)
}
d->applications[index].blocked = !d->applications[index].blocked;
dataChanged(QAbstractListModel::index(index), QAbstractListModel::index(index));
Q_EMIT dataChanged(QAbstractListModel::index(index), QAbstractListModel::index(index));
QStringList blockedApplications;
QStringList allowedApplications;
......
......@@ -279,7 +279,7 @@ void XlibConfig::defaults()
checkAccess();
m_parent->kcmDefaults();
m_parent->changed(true);
Q_EMIT m_parent->changed(true);
}
/** No descriptions */
......
......@@ -162,17 +162,17 @@ void PredicateModel::childrenChanging(const QModelIndex &item, Solid::Predicate:
}
if (rowCount(item) != 0 && newType != Solid::Predicate::Conjunction && newType != Solid::Predicate::Disjunction) {
emit beginRemoveRows(item, 0, 1);
beginRemoveRows(item, 0, 1);
currentItem->updateChildrenStatus();
emit endRemoveRows();
endRemoveRows();
return;
}
bool hasChildren = (newType == Solid::Predicate::Conjunction || newType == Solid::Predicate::Disjunction);
if (rowCount(item) == 0 && hasChildren) {
emit beginInsertRows(item, 0, 1);
beginInsertRows(item, 0, 1);
currentItem->updateChildrenStatus();
emit endInsertRows();
endInsertRows();
}
}
......@@ -107,7 +107,7 @@ void DeviceAutomounterKCM::forgetSelectedDevices()
}
}
emit markAsChanged();
markAsChanged();
}
void DeviceAutomounterKCM::load()
......
Supports Markdown
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