Commit 54540c30 authored by Leslie Zhai's avatar Leslie Zhai

Cleanup MediaCopyDialog

parent eb55cd29
......@@ -279,27 +279,11 @@ void K3b::MediaCopyDialog::slotStartClicked()
K3b::Medium burnMedium = k3bappcore->mediaCache()->medium( burnDev );
K3b::JobProgressDialog* dlg = 0;
if( m_checkOnlyCreateImage->isChecked() ) {
dlg = new K3b::JobProgressDialog( parentWidget() );
}
else {
dlg = new K3b::BurnProgressDialog( parentWidget() );
}
// FIXME: why segfault after close the dlg?
//
// The original CFG for short is like:
//
// auto dlg = new K3b::JobProgressDialog;
// if (bMightBeTrue)
// return; // Memory-leak
// delete dlg;
//
// For fixing Memory-leak issue changed to :
//
// auto dlg = new K3b::JobProgressDialog;
// dlg->setAttribute(Qt::WA_DeleteOnClose);
//
dlg->setAttribute(Qt::WA_DeleteOnClose);
if (m_checkOnlyCreateImage->isChecked())
dlg = new K3b::JobProgressDialog(parentWidget());
else
dlg = new K3b::BurnProgressDialog(parentWidget());
dlg->setAttribute(Qt::WA_DeleteOnClose); // Memory-leak issue fixed!
K3b::BurnJob* burnJob = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment