Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb51880-count-property' into 'master'
[nemo-systemsettings] Add count to the PermissionsModel. JB#51880

See merge request mer-core/nemo-qml-plugin-systemsettings!161
  • Loading branch information
rainemak committed Nov 20, 2020
2 parents 48fd219 + f669c83 commit a171cdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/permissionsmodel.cpp
Expand Up @@ -53,6 +53,7 @@ void PermissionsModel::setDesktopFile(QString file)
m_desktopFile = file;
loadPermissions();
emit desktopFileChanged();
emit countChanged();
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/permissionsmodel.h
Expand Up @@ -41,6 +41,7 @@ class SYSTEMSETTINGS_EXPORT PermissionsModel: public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(QString desktopFile READ desktopFile WRITE setDesktopFile NOTIFY desktopFileChanged)
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)

public:
explicit PermissionsModel(QObject *parent = nullptr);
Expand All @@ -60,6 +61,7 @@ class SYSTEMSETTINGS_EXPORT PermissionsModel: public QAbstractListModel

signals:
void desktopFileChanged();
void countChanged();

private:
void loadPermissions();
Expand Down

0 comments on commit a171cdb

Please sign in to comment.