diff options
| author | Nicolas Fella <[email protected]> | 2023-07-08 22:34:08 +0200 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2023-07-09 00:11:23 +0200 |
| commit | 31a8866ac0aa3966cd77e87e14974f0a6a66f940 (patch) | |
| tree | 85df580684c1467808d02b9b182091e4b453f907 /src/settings/servicemodel.h | |
| parent | 88ebcd42db91466ac32fa4a43482ee96e599bf7c (diff) | |
Fix usage of Qt::CheckStateRole in preview model
Qt::CheckStateRole expects an enum, not a bool
Also set the flag that the item it user checkable, otherwise it can't be changed
BUG: 471999
Diffstat (limited to 'src/settings/servicemodel.h')
| -rw-r--r-- | src/settings/servicemodel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/settings/servicemodel.h b/src/settings/servicemodel.h index 23c752e93..7a8607926 100644 --- a/src/settings/servicemodel.h +++ b/src/settings/servicemodel.h @@ -35,10 +35,11 @@ public: QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override; void clear(); + Qt::ItemFlags flags(const QModelIndex &index) const override; private: struct ServiceItem { - bool checked; + Qt::CheckState checked; bool configurable; QString icon; QString text; |
