From 29f7ea752fd34bdea64a7c7f2c505982ac39ce0d Mon Sep 17 00:00:00 2001 From: flow Date: Tue, 24 Jan 2023 16:52:09 -0300 Subject: 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 --- launcher/ui/dialogs/ResourceDownloadDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'launcher/ui/dialogs/ResourceDownloadDialog.cpp') diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index b9367c16..fa829bfb 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -147,7 +147,7 @@ void ResourceDownloadDialog::addResource(ModPlatform::IndexedPack& pack, ModPlat removeResource(pack, ver); ver.is_currently_selected = true; - m_selected.insert(pack.name, new ResourceDownloadTask(pack, ver, getBaseModel(), is_indexed)); + m_selected.insert(pack.name, makeShared(pack, ver, getBaseModel(), is_indexed)); m_buttons.button(QDialogButtonBox::Ok)->setEnabled(!m_selected.isEmpty()); } -- cgit