fix: don't allocate BlockedsModsDialog
Fixes temporary memory leak! Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
2fd7338cd3
commit
07359865c6
@ -393,14 +393,14 @@ void FlameCreationTask::idResolverSucceeded(QEventLoop& loop)
|
|||||||
if (anyBlocked) {
|
if (anyBlocked) {
|
||||||
qWarning() << "Blocked mods found, displaying mod list";
|
qWarning() << "Blocked mods found, displaying mod list";
|
||||||
|
|
||||||
auto message_dialog = new BlockedModsDialog(m_parent, tr("Blocked mods found"),
|
BlockedModsDialog message_dialog(m_parent, tr("Blocked mods found"),
|
||||||
tr("The following files are not available for download in third party launchers.<br/>"
|
tr("The following files are not available for download in third party launchers.<br/>"
|
||||||
"You will need to manually download them and add them to the instance."),
|
"You will need to manually download them and add them to the instance."),
|
||||||
blocked_mods);
|
blocked_mods);
|
||||||
|
|
||||||
message_dialog->setModal(true);
|
message_dialog.setModal(true);
|
||||||
|
|
||||||
if (message_dialog->exec()) {
|
if (message_dialog.exec()) {
|
||||||
qDebug() << "Post dialog blocked mods list: " << blocked_mods;
|
qDebug() << "Post dialog blocked mods list: " << blocked_mods;
|
||||||
copyBlockedMods(blocked_mods);
|
copyBlockedMods(blocked_mods);
|
||||||
setupDownloadJob(loop);
|
setupDownloadJob(loop);
|
||||||
|
@ -210,12 +210,14 @@ void PackInstallTask::onResolveModsSucceeded()
|
|||||||
if (anyBlocked) {
|
if (anyBlocked) {
|
||||||
qDebug() << "Blocked files found, displaying file list";
|
qDebug() << "Blocked files found, displaying file list";
|
||||||
|
|
||||||
auto message_dialog = new BlockedModsDialog(m_parent, tr("Blocked files found"),
|
BlockedModsDialog message_dialog(m_parent, tr("Blocked files found"),
|
||||||
tr("The following files are not available for download in third party launchers.<br/>"
|
tr("The following files are not available for download in third party launchers.<br/>"
|
||||||
"You will need to manually download them and add them to the instance."),
|
"You will need to manually download them and add them to the instance."),
|
||||||
m_blocked_mods);
|
m_blocked_mods);
|
||||||
|
|
||||||
if (message_dialog->exec() == QDialog::Accepted) {
|
message_dialog.setModal(true);
|
||||||
|
|
||||||
|
if (message_dialog.exec() == QDialog::Accepted) {
|
||||||
qDebug() << "Post dialog blocked mods list: " << m_blocked_mods;
|
qDebug() << "Post dialog blocked mods list: " << m_blocked_mods;
|
||||||
createInstance();
|
createInstance();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user