aboutsummaryrefslogtreecommitdiff
path: root/src/debug_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug_functions.cpp')
-rw-r--r--src/debug_functions.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/debug_functions.cpp b/src/debug_functions.cpp
index b8321640..1613a7d1 100644
--- a/src/debug_functions.cpp
+++ b/src/debug_functions.cpp
@@ -1,5 +1,7 @@
#include <QCoreApplication>
#include <QMessageBox>
+#include <QTimer>
+#include <functional>
#include "debug_functions.h"
@@ -7,6 +9,7 @@ void call_error(QString p_message)
{
QMessageBox *msgBox = new QMessageBox;
+ msgBox->setAttribute(Qt::WA_DeleteOnClose);
msgBox->setText(QCoreApplication::translate("debug_functions", "Error: %1")
.arg(p_message));
msgBox->setWindowTitle(
@@ -20,10 +23,15 @@ void call_notice(QString p_message)
{
QMessageBox *msgBox = new QMessageBox;
+ msgBox->setAttribute(Qt::WA_DeleteOnClose);
msgBox->setText(p_message);
msgBox->setWindowTitle(
QCoreApplication::translate("debug_functions", "Notice"));
- // msgBox->setWindowModality(Qt::NonModal);
- msgBox->exec();
+ msgBox->setStandardButtons(QMessageBox::NoButton);
+
+ QTimer::singleShot(3000, msgBox, std::bind(&QMessageBox::setStandardButtons,msgBox,QMessageBox::Ok));
+
+ msgBox->exec();
+
}