Put XcaWarningBox on the stack not on the heap

This commit is contained in:
Christian Hohnstaedt 2021-10-24 20:29:48 +02:00
parent 8271a1a3e8
commit 36e02374ff
2 changed files with 7 additions and 5 deletions

View File

@ -100,6 +100,10 @@ if(SPHINX)
endif()
endif()
if (NOT SPHINX OR NOT QTCOLLGEN)
add_custom_target(sphinx-qthelp)
endif()
if (NOT WIN32)
add_custom_command(
OUTPUT "${D}/xca.1.gz"

View File

@ -31,11 +31,9 @@ void xcaWarningBox::addButton(QMessageBox::StandardButton button,
int xcaWarningGui::showBox(const QString &txt, QMessageBox::Icon icn,
QMessageBox::StandardButtons b)
{
xcaWarningBox *w = new xcaWarningBox(NULL, txt, icn);
w->setStandardButtons(b);
int n = w->exec();
delete w;
return n;
xcaWarningBox w(NULL, txt, icn);
w.setStandardButtons(b);
return w.exec();
}
void xcaWarningGui::information(const QString &msg)