Commit 026b1c87 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

put back the cleaning of DataModel when database is cleared

BUG: 413100
parent 3fbe4ad6
......@@ -81,6 +81,8 @@ void ModelDataLoader::setDatabase(DatabaseInterface *database)
this, &ModelDataLoader::radioModified);
connect(database, &DatabaseInterface::radioRemoved,
this, &ModelDataLoader::radioRemoved);
connect(database, &DatabaseInterface::cleanedDatabase,
this, &ModelDataLoader::clearedDatabase);
}
void ModelDataLoader::loadData(ElisaUtils::PlayListEntryType dataType)
......
......@@ -98,6 +98,8 @@ Q_SIGNALS:
void radioRemoved(qulonglong radioId);
void clearedDatabase();
public Q_SLOTS:
void loadData(ElisaUtils::PlayListEntryType dataType);
......
......@@ -445,6 +445,8 @@ void DataModel::connectModel(DatabaseInterface *database)
this, &DataModel::radioModified);
connect(d->mDataLoader, &ModelDataLoader::radioRemoved,
this, &DataModel::radioRemoved);
connect(d->mDataLoader, &ModelDataLoader::clearedDatabase,
this, &DataModel::cleanedDatabase);
}
void DataModel::tracksAdded(ListTrackDataType newData)
......
......@@ -391,6 +391,7 @@ void MusicListenersManager::cleanedDatabase()
{
d->mImportedTracksCount = 0;
Q_EMIT importedTracksCountChanged();
Q_EMIT clearedDatabase();
}
void MusicListenersManager::balooAvailabilityChanged()
......
......@@ -129,6 +129,8 @@ Q_SIGNALS:
void clearDatabase();
void clearedDatabase();
void fileSystemIndexerActiveChanged();
void balooIndexerActiveChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment