Merge pull request #3019 from Trial97/task_parent
fixed double deletion for tasks
This commit is contained in:
@@ -140,8 +140,8 @@ Task::Ptr Index::loadVersion(const QString& uid, const QString& version, Net::Mo
|
||||
}
|
||||
|
||||
auto versionList = get(uid);
|
||||
auto loadTask = makeShared<SequentialTask>(
|
||||
this, tr("Load meta for %1:%2", "This is for the task name that loads the meta index.").arg(uid, version));
|
||||
auto loadTask =
|
||||
makeShared<SequentialTask>(tr("Load meta for %1:%2", "This is for the task name that loads the meta index.").arg(uid, version));
|
||||
if (status() != BaseEntity::LoadStatus::Remote || force) {
|
||||
loadTask->addTask(this->loadTask(mode));
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ VersionList::VersionList(const QString& uid, QObject* parent) : BaseVersionList(
|
||||
|
||||
Task::Ptr VersionList::getLoadTask()
|
||||
{
|
||||
auto loadTask =
|
||||
makeShared<SequentialTask>(this, tr("Load meta for %1", "This is for the task name that loads the meta index.").arg(m_uid));
|
||||
auto loadTask = makeShared<SequentialTask>(tr("Load meta for %1", "This is for the task name that loads the meta index.").arg(m_uid));
|
||||
loadTask->addTask(APPLICATION->metadataIndex()->loadTask(Net::Mode::Online));
|
||||
loadTask->addTask(this->loadTask(Net::Mode::Online));
|
||||
return loadTask;
|
||||
|
||||
Reference in New Issue
Block a user