Skip to content

Commit ca13a9a

Browse files
committed
Fix memory leak with pMsg
1 parent 3659884 commit ca13a9a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/mixxxmainwindow.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,15 +1262,15 @@ void MixxxMainWindow::slotLibraryScanSummaryDlg(const LibraryScanResultSummary&
12621262
return;
12631263
}
12641264

1265-
QMessageBox* pMsg = new QMessageBox();
1266-
pMsg->setTextFormat(Qt::RichText); // required to get bold text with <b> tags
1267-
pMsg->setWindowTitle(tr("Library scan finished"));
1265+
QMessageBox msgBox;
1266+
msgBox.setTextFormat(Qt::RichText); // required to get bold text with <b> tags
1267+
msgBox.setWindowTitle(tr("Library scan finished"));
12681268

12691269
if (result.noDirectoriesConfigured) {
1270-
pMsg->setText(tr("No music directories configured for scanning.") +
1270+
msgBox.setText(tr("No music directories configured for scanning.") +
12711271
QStringLiteral("<br>") +
12721272
tr("Add directories in the library preferences."));
1273-
pMsg->show();
1273+
msgBox.show();
12741274
return;
12751275
}
12761276

@@ -1309,8 +1309,8 @@ void MixxxMainWindow::slotLibraryScanSummaryDlg(const LibraryScanResultSummary&
13091309
QStringLiteral("</b>");
13101310
}
13111311

1312-
pMsg->setText(summary);
1313-
pMsg->show();
1312+
msgBox.setText(summary);
1313+
msgBox.show();
13141314
}
13151315

13161316
void MixxxMainWindow::slotShowKeywheel(bool toggle) {

0 commit comments

Comments
 (0)