summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-26 05:50:27 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-26 05:50:27 (GMT)
commitb8f3ff3f7c5f64de31ce5f3a5ba2cfc1794cae89 (patch)
tree84d4bfad194f5401d34be169410494a3386a8892
parentea6af0daffd5ceb9ad9034970d84fb8cb0182b31 (diff)
Move to constructor
-rw-r--r--src/configureplugins/configurepluginslistwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/configureplugins/configurepluginslistwidget.cpp b/src/configureplugins/configurepluginslistwidget.cpp
index 1f46eb0..19c6178 100644
--- a/src/configureplugins/configurepluginslistwidget.cpp
+++ b/src/configureplugins/configurepluginslistwidget.cpp
@@ -44,6 +44,9 @@ ConfigurePluginsListWidget::ConfigurePluginsListWidget(QWidget *parent)
mListWidget->setObjectName(QStringLiteral("listwidget"));
mListWidget->setHeaderHidden(true);
mListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+ mListWidget->setColumnCount(2);
+ mListWidget->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
+
connect(mListWidget, &QTreeWidget::itemSelectionChanged, this, &ConfigurePluginsListWidget::slotItemSelectionChanged);
connect(mListWidget, &QTreeWidget::itemChanged, this, &ConfigurePluginsListWidget::slotItemChanged);
@@ -109,8 +112,7 @@ void ConfigurePluginsListWidget::savePlugins(const QString &groupName, const QSt
void ConfigurePluginsListWidget::fillTopItems(const QVector<PimCommon::PluginUtilData> &lst, const QString &topLevelItemName,
const QString &groupName, const QString &prefixKey, QList<PluginItem *> &itemsList, const QString &configureGroupName)
{
- mListWidget->setColumnCount(2);
- mListWidget->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
+
itemsList.clear();
if (!lst.isEmpty()) {
QTreeWidgetItem *topLevel = new QTreeWidgetItem(mListWidget, QStringList() << topLevelItemName);