diff --git a/kcmkwin/kwincompositing/model.cpp b/kcmkwin/kwincompositing/model.cpp index 48f2cfaff9..b71df2eaa1 100644 --- a/kcmkwin/kwincompositing/model.cpp +++ b/kcmkwin/kwincompositing/model.cpp @@ -63,6 +63,7 @@ QHash< int, QByteArray > EffectModel::roleNames() const roleNames[CategoryRole] = "CategoryRole"; roleNames[ServiceNameRole] = "ServiceNameRole"; roleNames[EffectStatusRole] = "EffectStatusRole"; + roleNames[VideoRole] = "VideoRole"; return roleNames; } @@ -123,6 +124,8 @@ QVariant EffectModel::data(const QModelIndex &index, int role) const return m_effectsList.at(index.row()).serviceName; case EffectStatusRole: return m_effectsList.at(index.row()).effectStatus; + case VideoRole: + return m_effectsList.at(index.row()).video; default: return QVariant(); } @@ -179,6 +182,7 @@ void EffectModel::loadEffects() effect.serviceName = plugin.pluginName(); effect.effectStatus = kwinConfig.readEntry(effect.serviceName + "Enabled", plugin.isPluginEnabledByDefault()); effect.enabledByDefault = plugin.isPluginEnabledByDefault(); + effect.video = service->property(QStringLiteral("X-KWin-Video-Url"), QVariant::Url).toUrl(); m_effectsList << effect; } diff --git a/kcmkwin/kwincompositing/model.h b/kcmkwin/kwincompositing/model.h index 0616b1e1ce..b757032720 100644 --- a/kcmkwin/kwincompositing/model.h +++ b/kcmkwin/kwincompositing/model.h @@ -45,6 +45,7 @@ struct EffectData { QString serviceName; bool effectStatus; bool enabledByDefault; + QUrl video; }; class EffectModel : public QAbstractItemModel @@ -63,7 +64,8 @@ public: CategoryRole, ServiceNameRole, EffectStatusRole, - WindowManagementRole + WindowManagementRole, + VideoRole }; explicit EffectModel(QObject *parent = 0);