Fix a crash when shutting down plasma shell, while destruction models

fixed with help of David and Aleix
This commit is contained in:
Joseph Wenninger 2014-09-09 09:56:36 +02:00
parent 9b6205c99e
commit 1279b3d253
2 changed files with 1 additions and 2 deletions

View File

@ -163,7 +163,7 @@ void DataSource::modelChanged(const QString &sourceName, QAbstractItemModel *mod
m_models->insert(sourceName, QVariant::fromValue(model));
//FIXME: this will break in the case a second model is set
connect(model, &QObject::destroyed, [ = ]() {
connect(model, &QObject::destroyed, m_models, [ = ]() {
m_models->clear(sourceName);
});
}

View File

@ -54,7 +54,6 @@ public:
typedef QMap<QString, QVariant> Data;
DataSource(QObject *parent = 0);
/**
* true if the connection to the Plasma DataEngine is valid
*/