From 753b1a2b0ca6b484cbd5c5940f9c1cb0c7a5aaf1 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 16 Nov 2020 00:29:29 +0100 Subject: [PATCH] Constify variable --- app/qml/PluginSettings.qml | 8 -------- interfaces/pluginmodel.cpp | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/qml/PluginSettings.qml b/app/qml/PluginSettings.qml index 04be78b5b..5914e7078 100644 --- a/app/qml/PluginSettings.qml +++ b/app/qml/PluginSettings.qml @@ -17,8 +17,6 @@ Kirigami.ScrollablePage property string device ListView { - id: sinkList - anchors.fill: parent model: PluginModel { @@ -26,9 +24,6 @@ Kirigami.ScrollablePage } delegate: Kirigami.SwipeListItem { - width: parent.width - enabled: true - supportsMouseEvents: false CheckBox { checked: isChecked @@ -58,7 +53,4 @@ Kirigami.ScrollablePage ] } } - } - - diff --git a/interfaces/pluginmodel.cpp b/interfaces/pluginmodel.cpp index ae0aa1c85..d884743c9 100644 --- a/interfaces/pluginmodel.cpp +++ b/interfaces/pluginmodel.cpp @@ -51,7 +51,7 @@ QVariant PluginModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::CheckStateRole: { - QString def = pluginEntry.isEnabledByDefault() ? QStringLiteral("true") : QStringLiteral("false"); + const QString def = pluginEntry.isEnabledByDefault() ? QStringLiteral("true") : QStringLiteral("false"); return m_config->group("Plugins").readEntry(QStringLiteral("%1Enabled").arg(pluginEntry.pluginId()), def) == QStringLiteral("true"); } case Qt::DisplayRole: