mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 05:16:59 +03:00
Merge pull request #628 from flowln/fix_multiple_resource_packs_crash
Fixes https://github.com/PrismLauncher/PrismLauncher/issues/624
This commit is contained in:
parent
3b1ab3c974
commit
5203e72199
7 changed files with 47 additions and 19 deletions
|
|
@ -20,6 +20,7 @@ ResourceFolderModel::ResourceFolderModel(QDir dir, QObject* parent) : QAbstractL
|
|||
m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware);
|
||||
|
||||
connect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &ResourceFolderModel::directoryChanged);
|
||||
connect(&m_helper_thread_task, &ConcurrentTask::finished, this, [this]{ m_helper_thread_task.clear(); });
|
||||
}
|
||||
|
||||
ResourceFolderModel::~ResourceFolderModel()
|
||||
|
|
@ -275,7 +276,11 @@ void ResourceFolderModel::resolveResource(Resource* res)
|
|||
connect(
|
||||
task, &Task::finished, this, [=] { m_active_parse_tasks.remove(ticket); }, Qt::ConnectionType::QueuedConnection);
|
||||
|
||||
QThreadPool::globalInstance()->start(task);
|
||||
m_helper_thread_task.addTask(task);
|
||||
|
||||
if (!m_helper_thread_task.isRunning()) {
|
||||
QThreadPool::globalInstance()->start(&m_helper_thread_task);
|
||||
}
|
||||
}
|
||||
|
||||
void ResourceFolderModel::onUpdateSucceeded()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue