summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-19 20:21:48 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-19 20:21:48 (GMT)
commit0d6da5eb62cb11490a5a5624e5cb04a5cab17b86 (patch)
tree2cc417ef2a5c3095ae1370b2a3683f1777bb78fb
parent8db8d345867e50a583412ad07d885f21c973d36c (diff)
Reduce duplicate code
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/configureplugins/configurepluginslistwidget.cpp7
-rw-r--r--src/configureplugins/configurepluginslistwidget.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ce1c51..f4e0dd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
include(ECMInstallIcons)
-set(PIM_VERSION "5.3.50")
+set(PIM_VERSION "5.3.51")
set(PIMCOMMON_LIB_VERSION ${PIM_VERSION})
set(AKONADIMIME_LIB_VERSION "5.3.40")
diff --git a/src/configureplugins/configurepluginslistwidget.cpp b/src/configureplugins/configurepluginslistwidget.cpp
index e424c9f..7f6b9f3 100644
--- a/src/configureplugins/configurepluginslistwidget.cpp
+++ b/src/configureplugins/configurepluginslistwidget.cpp
@@ -122,3 +122,10 @@ void ConfigurePluginsListWidget::fillTopItems(const QVector<PimCommon::PluginUti
}
}
+void ConfigurePluginsListWidget::changeState(const QList<PluginItem *> &items)
+{
+ Q_FOREACH (PluginItem *item, items) {
+ item->setCheckState(0, item->mEnableByDefault ? Qt::Checked : Qt::Unchecked);
+ }
+}
+
diff --git a/src/configureplugins/configurepluginslistwidget.h b/src/configureplugins/configurepluginslistwidget.h
index dc05d4e..7d80e64 100644
--- a/src/configureplugins/configurepluginslistwidget.h
+++ b/src/configureplugins/configurepluginslistwidget.h
@@ -61,6 +61,8 @@ protected:
};
void savePlugins(const QString &groupName, const QString &prefixSettingKey, const QList<PluginItem *> &listItems);
void fillTopItems(const QVector<PimCommon::PluginUtilData> &lst, const QString &topLevelItemName, const QString &groupName, const QString &prefixKey, QList<PluginItem *> &itemsList);
+ void changeState(const QList<PluginItem *> &items);
+
QTreeWidget *mListWidget;
};
}