diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 0ec09d83..57da6503 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -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" diff --git a/widgets/XcaWarning.cpp b/widgets/XcaWarning.cpp index 36a2b67b..c7772784 100644 --- a/widgets/XcaWarning.cpp +++ b/widgets/XcaWarning.cpp @@ -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)