fix datamodel (adapt to api change)
also, change some connects to the new syntax, so next time a thing like that gets catched
This commit is contained in:
parent
68a693af67
commit
4c79f8fcff
@ -188,7 +188,7 @@ DataModel::~DataModel()
|
||||
{
|
||||
}
|
||||
|
||||
void DataModel::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
|
||||
void DataModel::dataUpdated(const QString &sourceName, const QVariantMap &data)
|
||||
{
|
||||
if (!m_sourceFilter.isEmpty() && m_sourceFilterRE.isValid() && !m_sourceFilterRE.exactMatch(sourceName)) {
|
||||
return;
|
||||
@ -259,10 +259,12 @@ void DataModel::setDataSource(QObject *object)
|
||||
++i;
|
||||
}
|
||||
|
||||
connect(m_dataSource, SIGNAL(newData(const QString &, const Plasma::DataEngine::Data &)),
|
||||
this, SLOT(dataUpdated(const QString &, const Plasma::DataEngine::Data &)));
|
||||
connect(m_dataSource, SIGNAL(sourceRemoved(const QString &)), this, SLOT(removeSource(const QString &)));
|
||||
connect(m_dataSource, SIGNAL(sourceDisconnected(const QString &)), this, SLOT(removeSource(const QString &)));
|
||||
connect(m_dataSource, &DataSource::newData,
|
||||
this, &DataModel::dataUpdated);
|
||||
connect(m_dataSource, &DataSource::sourceRemoved,
|
||||
this, &DataModel::removeSource);
|
||||
connect(m_dataSource, &DataSource::sourceDisconnected,
|
||||
this, &DataModel::removeSource);
|
||||
}
|
||||
|
||||
QObject *DataModel::dataSource() const
|
||||
|
@ -196,7 +196,7 @@ Q_SIGNALS:
|
||||
void filterRegExpChanged(const QString &);
|
||||
|
||||
private Q_SLOTS:
|
||||
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data);
|
||||
void dataUpdated(const QString &sourceName, const QVariantMap &data);
|
||||
void removeSource(const QString &sourceName);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user