summaryrefslogtreecommitdiff
path: root/client/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets')
-rw-r--r--client/widgets/metawidget.cc6
-rw-r--r--client/widgets/multilist.cc17
2 files changed, 12 insertions, 11 deletions
diff --git a/client/widgets/metawidget.cc b/client/widgets/metawidget.cc
index c085f10..5491790 100644
--- a/client/widgets/metawidget.cc
+++ b/client/widgets/metawidget.cc
@@ -29,7 +29,7 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
-#include <QMessageBox>
+#include "messagebox.h"
#include "widgetbuilder.h"
#include "formatparser.h"
@@ -120,10 +120,10 @@ bool MetaWidget::isValid()
while (i != widgets.end()) {
Widget* w = *i;
if(w->isValid() == false) {
- QMessageBox::critical(NULL, "Fejl",
+ MessageBox::critical(NULL, "Fejl",
"Et af inputfelterne (" + w->getName()
+ ") er ikke udfyldt korrekt, prøv igen.\n"
- , QMessageBox::Ok);
+ , MessageBox::Ok);
return false;
}
i++;
diff --git a/client/widgets/multilist.cc b/client/widgets/multilist.cc
index 4d34691..87f4975 100644
--- a/client/widgets/multilist.cc
+++ b/client/widgets/multilist.cc
@@ -26,12 +26,13 @@
*/
#include "multilist.h"
-#include <QMessageBox>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include <QPushButton>
+#include "messagebox.h"
+
#include "widgetbuilder.h"
#include "common.h"
@@ -127,25 +128,25 @@ void MultiList::changed()
bool MultiList::isValid()
{
if(innerwidget_has_changes) {
- switch(QMessageBox::warning(NULL,
+ switch(MessageBox::warning(NULL,
"Gem ændringerne i listen?",
"Der er lavet en ændring som ikke er tilføjet til listen.\n"
"Ønsker du at tilføje ændringen til listen inden du gemmer makroen?",
- QMessageBox::Save | QMessageBox::Close | QMessageBox::Cancel)) {
- case QMessageBox::Save:
+ MessageBox::Save | MessageBox::Close | MessageBox::Cancel)) {
+ case MessageBox::Save:
if(innerwidget && innerwidget->isValid()) {
add();
} else {
- QMessageBox::critical(NULL,
+ MessageBox::critical(NULL,
"Fejl",
"Der er fejl i ændringen, og den kan ikke tilføjes til listen.\n",
- QMessageBox::Ok);
+ MessageBox::Ok);
return false;
}
break;
- case QMessageBox::Close:
+ case MessageBox::Close:
break;
- case QMessageBox::Cancel:
+ case MessageBox::Cancel:
default:
// FIXME: How to we actually block the commit and return to the editor?
return false;