@@ -70,8 +70,9 @@ IndicatorsModel::IndicatorsModel(QObject *parent)
7070/*! \internal */
7171IndicatorsModel::~IndicatorsModel()
7272{
73− delete m_widgetsMap;
74− delete m_manager;
73+ disconnect(m_manager, 0, 0, 0);
74+ m_manager->deleteLater();
75+ m_widgetsMap->deleteLater();
7576}
7677
7778/*!
@@ -155,6 +156,7 @@ void IndicatorsModel::onIndicatorLoaded(const QString& indicator)
155156 QObject* obj = dynamic_cast<QObject*>(plugin.get());
156157 if (obj)
157158 {
159+ QObject::connect(obj, SIGNAL(idChanged(const QString&)), this, SLOT(onIdChanged()));
158160 QObject::connect(obj, SIGNAL(iconChanged(const QUrl&)), this, SLOT(onIconChanged()));
159161 QObject::connect(obj, SIGNAL(titleChanged(const QString&)), this, SLOT(onTitleChanged()));
160162 QObject::connect(obj, SIGNAL(labelChanged(const QString&)), this, SLOT(onLabelChanged()));
@@ -189,6 +191,12 @@ void IndicatorsModel::onIndicatorAboutToBeUnloaded(const QString& indicator)
189191
190192}
191193
194+/*! \internal */
195+void IndicatorsModel::onIdChanged()
196+{
197+ notifyDataChanged(QObject::sender(), Identifier);
198+}
199+
192200/*! \internal */
193201void IndicatorsModel::onIconChanged()
194202{
@@ -233,6 +241,7 @@ QHash<int, QByteArray> IndicatorsModel::roleNames() const
233241{
234242 static QHash<int, QByteArray> roles;
235243 if (roles.isEmpty()) {
244+ roles[Identifier] = "identifier";
236245 roles[Title] = "title";
237246 roles[IconSource] = "iconSource";
238247 roles[Label] = "label";
@@ -261,6 +270,11 @@ QVariant IndicatorsModel::data(const QModelIndex &index, int role) const
261270 IndicatorClientInterface::Ptr plugin = m_plugins[index.row()];
262271
263272 switch (role) {
273+ case Identifier:
274+ if (plugin) {
275+ attribute = QVariant(plugin->identifier());
276+ }
277+ break;
264278 case Title:
265279 if (plugin) {
266280 attribute = QVariant(plugin->title());