refactor: make shared_qobject_ptr ctor explicit

This turns issues like creating two shared ptrs from a single raw ptr
from popping up at runtime, instead making them a compile error.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2023-01-24 16:52:09 -03:00
parent 5186ad95d3
commit 29f7ea752f
63 changed files with 301 additions and 287 deletions

View File

@ -172,7 +172,7 @@ void FlameCheckUpdate::executeTask()
old_version = current_ver.version;
}
auto download_task = new ResourceDownloadTask(pack, latest_ver, m_mods_folder);
auto download_task = makeShared<ResourceDownloadTask>(pack, latest_ver, m_mods_folder);
m_updatable.emplace_back(pack.name, mod->metadata()->hash, old_version, latest_ver.version,
api.getModFileChangelog(latest_ver.addonId.toInt(), latest_ver.fileId.toInt()),
ModPlatform::ResourceProvider::FLAME, download_task);