From 083f6707195d04ceca46f9c2d545516a72d47164 Mon Sep 17 00:00:00 2001 From: Antonis Tsiapaliokas Date: Tue, 10 Sep 2013 14:35:51 +0300 Subject: [PATCH] Rename effectStatus => updateEffectStatus method --- kcmkwin/kwincompositing/model.cpp | 8 ++++---- kcmkwin/kwincompositing/model.h | 4 ++-- kcmkwin/kwincompositing/qml/EffectView.qml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index 96be6bc9ad..f35a4508c2 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -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() diff --git a/kcmkwin/kwincompositing/model.h b/kcmkwin/kwincompositing/model.h index 61c4980dbc..1447459cef 100644 --- a/kcmkwin/kwincompositing/model.h +++ b/kcmkwin/kwincompositing/model.h @@ -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); diff --git a/kcmkwin/kwincompositing/qml/EffectView.qml b/kcmkwin/kwincompositing/qml/EffectView.qml index f1f0011c65..c57497e214 100644 --- a/kcmkwin/kwincompositing/qml/EffectView.qml +++ b/kcmkwin/kwincompositing/qml/EffectView.qml @@ -105,7 +105,7 @@ Item { signal effectState(int rowIndex, bool enabled) onEffectState: { - searchModel.effectStatus(rowIndex, enabled); + searchModel.updateEffectStatus(rowIndex, enabled); } }