[EventPluginsManager] Expose pluginPath in model

That's what digital clock stores in its config, allows us to do matching.

Differential Revision: https://phabricator.kde.org/D7601
This commit is contained in:
Kai Uwe Broulik 2017-08-31 14:27:43 +02:00
parent a963302926
commit d574dec0f8

View File

@ -41,6 +41,7 @@ public:
m_roles = QAbstractListModel::roleNames();
m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked"));
m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi"));
m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath"));
};
// make these two available to the manager
@ -90,6 +91,8 @@ public:
const QString qmlFilePath = metadata.configUi;
return QString(pathRef % '/' % qmlFilePath);
}
case Qt::UserRole + 1:
return currentPlugin;
case Qt::EditRole:
return m_manager->m_enabledPlugins.contains(currentPlugin);
}