Fix a crash when shutting down plasma shell, while destruction models
fixed with help of David and Aleix
This commit is contained in:
parent
9b6205c99e
commit
1279b3d253
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ public:
|
||||
typedef QMap<QString, QVariant> Data;
|
||||
|
||||
DataSource(QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* true if the connection to the Plasma DataEngine is valid
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user