diff options
author | flow <flowlnlnln@gmail.com> | 2023-01-24 16:52:09 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2023-01-25 16:57:51 -0300 |
commit | 29f7ea752fd34bdea64a7c7f2c505982ac39ce0d (patch) | |
tree | f3d76dd640ae4f6a241fb0ff4532d938dc1c33bd /launcher/ui/dialogs/ResourceDownloadDialog.cpp | |
parent | 5186ad95d3cd66da8c844d9c3c0cd95b8b2f0b94 (diff) | |
download | PrismLauncher-29f7ea752fd34bdea64a7c7f2c505982ac39ce0d.tar.gz PrismLauncher-29f7ea752fd34bdea64a7c7f2c505982ac39ce0d.tar.bz2 PrismLauncher-29f7ea752fd34bdea64a7c7f2c505982ac39ce0d.zip |
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>
Diffstat (limited to 'launcher/ui/dialogs/ResourceDownloadDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/ResourceDownloadDialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<ResourceDownloadTask>(pack, ver, getBaseModel(), is_indexed)); m_buttons.button(QDialogButtonBox::Ok)->setEnabled(!m_selected.isEmpty()); } |