Commit 1407b82c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

SourcesPage: Use ItemIsUserCheckable to check if a source is checkable

We use it to disable the control if it's not, this way the backend can
support to tell the state but not allow interaction.

(cherry picked from commit 5365c43a)
parent 5f7350e8
......@@ -210,7 +210,7 @@ DiscoverPage {
readonly property variant idx: sourcesView.model.index(index, 0)
readonly property variant modelChecked:, Qt.CheckStateRole)
checked: modelChecked !== Qt.Unchecked
enabled: modelChecked !== undefined
enabled: sourcesView.model.flags(idx) & Qt.ItemIsUserCheckable
onClicked: {
sourcesView.model.setData(idx, checkState, Qt.CheckStateRole)
checked = Qt.binding(function() { return modelChecked !== Qt.Unchecked; })
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment