Constify variable

This commit is contained in:
Nicolas Fella 2020-11-16 00:29:29 +01:00
parent 8be089472f
commit 753b1a2b0c
2 changed files with 1 additions and 9 deletions

View file

@ -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
]
}
}
}

View file

@ -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: