diff --git a/src/contentmanager.cpp b/src/contentmanager.cpp index d78d11772..9d3377b4d 100644 --- a/src/contentmanager.cpp +++ b/src/contentmanager.cpp @@ -18,6 +18,7 @@ #include "contentmanagerdelegate.h" #include "node.h" #include "kiwixconfirmbox.h" +#include ContentManager::ContentManager(Library* library, kiwix::Downloader* downloader, QObject *parent) : QObject(parent), @@ -539,11 +540,13 @@ void ContentManager::updateLibrary() { #define CATALOG_URL "library.kiwix.org" void ContentManager::updateRemoteLibrary(const QString& content) { - m_remoteLibrary = kiwix::Library(); - kiwix::Manager manager(&m_remoteLibrary); - manager.readOpds(content.toStdString(), CATALOG_URL); - emit(this->booksChanged()); - emit(this->pendingRequest(false)); + QtConcurrent::run([=]() { + m_remoteLibrary = kiwix::Library(); + kiwix::Manager manager(&m_remoteLibrary); + manager.readOpds(content.toStdString(), CATALOG_URL); + emit(this->booksChanged()); + emit(this->pendingRequest(false)); + }); } void ContentManager::setSearch(const QString &search)