Rename effectStatus => updateEffectStatus method
This commit is contained in:
parent
12f8544b0f
commit
083f670719
3 changed files with 7 additions and 7 deletions
|
@ -211,7 +211,7 @@ void EffectModel::handleDesktopSwitching(int row)
|
|||
void EffectModel::handleWindowManagement(int row, bool enabled)
|
||||
{
|
||||
//Make sure that our row is valid
|
||||
if (m_effectsList.size() > 0 && row < = m_effectsList.size())
|
||||
if (m_effectsList.size() > 0 && row <= m_effectsList.size())
|
||||
m_effectsList[row].effectStatus = enabled;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ void EffectModel::syncEffectsToKWin()
|
|||
m_effectsChanged = m_effectsList;
|
||||
}
|
||||
|
||||
void EffectModel::effectStatus(const QModelIndex &rowIndex, bool effectState)
|
||||
void EffectModel::updateEffectStatus(const QModelIndex &rowIndex, bool effectState)
|
||||
{
|
||||
setData(rowIndex, effectState, EffectModel::EffectStatusRole);
|
||||
}
|
||||
|
@ -338,11 +338,11 @@ bool EffectFilterModel::filterAcceptsRow(int source_row, const QModelIndex &sour
|
|||
return false;
|
||||
}
|
||||
|
||||
void EffectFilterModel::effectStatus(int rowIndex, bool effectState)
|
||||
void EffectFilterModel::updateEffectStatus(int rowIndex, bool effectState)
|
||||
{
|
||||
const QModelIndex sourceIndex = mapToSource(index(rowIndex, 0));
|
||||
|
||||
m_effectModel->effectStatus(sourceIndex, effectState);
|
||||
m_effectModel->updateEffectStatus(sourceIndex, effectState);
|
||||
}
|
||||
|
||||
void EffectFilterModel::syncConfig()
|
||||
|
|
|
@ -74,7 +74,7 @@ public:
|
|||
|
||||
virtual QHash< int, QByteArray > roleNames() const override;
|
||||
|
||||
void effectStatus(const QModelIndex &rowIndex, bool effectState);
|
||||
void updateEffectStatus(const QModelIndex &rowIndex, bool effectState);
|
||||
void syncEffectsToKWin();
|
||||
void syncConfig();
|
||||
void enableWidnowManagement(bool enabled);
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
EffectFilterModel(QObject *parent = 0);
|
||||
const QString &filter() const;
|
||||
|
||||
Q_INVOKABLE void effectStatus(int rowIndex, bool effectState);
|
||||
Q_INVOKABLE void updateEffectStatus(int rowIndex, bool effectState);
|
||||
Q_INVOKABLE void syncConfig();
|
||||
Q_INVOKABLE void enableWidnowManagement(bool enabled);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ Item {
|
|||
signal effectState(int rowIndex, bool enabled)
|
||||
|
||||
onEffectState: {
|
||||
searchModel.effectStatus(rowIndex, enabled);
|
||||
searchModel.updateEffectStatus(rowIndex, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue