Do UpdateCompilations in the library scanner thread so as to not block
the GUI on startup.
This commit is contained in:
parent
3d8c11ff5a
commit
a95fb6d1e6
@ -44,10 +44,6 @@ void LibraryBackend::UpdateTotalSongCountAsync() {
|
||||
metaObject()->invokeMethod(this, "UpdateTotalSongCount", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void LibraryBackend::UpdateCompilationsAsync() {
|
||||
metaObject()->invokeMethod(this, "UpdateCompilations", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void LibraryBackend::LoadDirectories() {
|
||||
QSqlDatabase db(db_->Connect());
|
||||
|
||||
|
@ -80,8 +80,6 @@ class LibraryBackend : public QObject {
|
||||
void AddDirectory(const QString& path);
|
||||
void RemoveDirectory(const Directory& dir);
|
||||
|
||||
void UpdateCompilationsAsync();
|
||||
|
||||
bool ExecQuery(LibraryQuery* q);
|
||||
|
||||
public slots:
|
||||
|
@ -157,7 +157,7 @@ void LibraryWatcher::AddDirectory(const Directory& dir, const SubdirectoryList&
|
||||
}
|
||||
}
|
||||
|
||||
backend_->UpdateCompilationsAsync();
|
||||
backend_->UpdateCompilations();
|
||||
}
|
||||
|
||||
void LibraryWatcher::ScanSubdirectory(
|
||||
@ -374,7 +374,7 @@ void LibraryWatcher::RescanPathsNow() {
|
||||
|
||||
rescan_queue_.clear();
|
||||
|
||||
backend_->UpdateCompilationsAsync();
|
||||
backend_->UpdateCompilations();
|
||||
}
|
||||
|
||||
QString LibraryWatcher::PickBestImage(const QStringList& images) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user