diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-03-21 17:48:11 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-03-21 17:48:11 +0000 |
| commit | 3feda2eb202d0591f759817086bbee6517397d23 (patch) | |
| tree | 7cf4f64d552ad0731a65cff6de619e11d84add89 /src/plugins | |
| parent | a79c269f9a01ae88bfcb1e5ab94ef883c4405fab (diff) | |
| download | qmmp-3feda2eb202d0591f759817086bbee6517397d23.tar.gz qmmp-3feda2eb202d0591f759817086bbee6517397d23.tar.bz2 qmmp-3feda2eb202d0591f759817086bbee6517397d23.zip | |
library: fixed regression
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9774 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/General/library/library.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/General/library/library.cpp b/src/plugins/General/library/library.cpp index a833e4b32..788c82811 100644 --- a/src/plugins/General/library/library.cpp +++ b/src/plugins/General/library/library.cpp @@ -72,13 +72,13 @@ Library::Library(QPointer<LibraryWidget> *libraryWidget, QObject *parent) : UiHelper::instance()->addAction(refreshAction, UiHelper::TOOLS_MENU); connect(refreshAction, SIGNAL(triggered()), SLOT(startDirectoryScanning())); - connect(this, &QThread::finished, [=] { + connect(this, &QThread::finished, this, [=] { if(!m_libraryWidget->isNull()) { m_libraryWidget->data()->setBusyMode(false); m_libraryWidget->data()->refresh(); } - }); + }, Qt::QueuedConnection); if(settings.value("Library/recreate_db", false).toBool()) { @@ -246,7 +246,6 @@ bool Library::scanDirectories(const QStringList &paths) { m_stopped = false; - while(!m_stopped) { QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", CONNECTION_NAME); db.setDatabaseName(Qmmp::configDir() + "/" + "library.sqlite"); @@ -260,13 +259,12 @@ bool Library::scanDirectories(const QStringList &paths) { addDirectory(path); if(m_stopped) - { - db.close(); break; - } } - removeMissingFiles(paths); + if(!m_stopped) + removeMissingFiles(paths); + db.close(); } |
