refactor!!!: migrate from shared pointers

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
(cherry picked from commit 549405ab2f)
This commit is contained in:
Octol1ttle 2026-01-07 19:16:54 +05:00 committed by Trial97
parent 7755e0def9
commit e89ce1124a
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
199 changed files with 742 additions and 710 deletions

View file

@ -31,7 +31,7 @@
ResourceDownloadTask::ResourceDownloadTask(ModPlatform::IndexedPack::Ptr pack,
ModPlatform::IndexedVersion version,
const std::shared_ptr<ResourceFolderModel> packs,
ResourceFolderModel* packs,
bool is_indexed)
: m_pack(std::move(pack)), m_pack_version(std::move(version)), m_pack_model(packs)
{
@ -88,7 +88,7 @@ void ResourceDownloadTask::downloadSucceeded()
m_pack_model->uninstallResource(oldFilename, true);
// also rename the shader config file
if (dynamic_cast<ShaderPackFolderModel*>(m_pack_model.get()) != nullptr) {
if (dynamic_cast<ShaderPackFolderModel*>(m_pack_model) != nullptr) {
QFileInfo oldConfig(m_pack_model->dir(), oldFilename + ".txt");
QFileInfo newConfig(m_pack_model->dir(), getFilename() + ".txt");