From c6f0cc9f20d5446468cbbf5055524eadb8c677e0 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Fri, 14 May 2021 09:36:44 +0200 Subject: [PATCH] Notifications: do not send notification about successful writing twice We already handle case where the helper successfully writes the image before it exits so there is no reason to handle it again and send the same notification --- app/linuxdrivemanager.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/linuxdrivemanager.cpp b/app/linuxdrivemanager.cpp index 9b727187..443559bb 100644 --- a/app/linuxdrivemanager.cpp +++ b/app/linuxdrivemanager.cpp @@ -354,10 +354,7 @@ void LinuxDrive::onFinished(int exitCode, QProcess::ExitStatus status) { m_image->setStatus(ReleaseVariant::FAILED); } } - else { - Notifications::notify(tr("Finished!"), tr("Writing %1 was successful").arg(m_image->fullName())); - m_image->setStatus(ReleaseVariant::FINISHED); - } + if (m_process) { m_process->deleteLater(); m_process = nullptr;