aboutsummaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 363dcc0..ec2026e 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -11,6 +11,7 @@
#include <QMimeData>
#include <QCommandLineParser>
#include <QMessageBox>
+#include <cstdlib>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
@@ -27,13 +28,13 @@ MainWindow::~MainWindow()
void MainWindow::act_command_line(CommandLineParsedOptions &options, QCommandLineParser &parser) {
switch (options.result) {
case CommandLineError:
- QMessageBox::critical(this, tr("Command line"), tr("The passed command line is incorrect and will be ignored.\nMore information: %1").arg(options.error_message));
+ QMessageBox::critical(this, tr("Command line"), tr("The passed command line is incorrect and will be ignored.\nMore information: %1").arg(options.error_message)); exit(EXIT_FAILURE);
break;
case CommandLineHelpRequested:
- QMessageBox::information(this, QGuiApplication::applicationDisplayName(), "<pre>" + parser.helpText() + "</pre>"); exit(0);
+ QMessageBox::information(this, QGuiApplication::applicationDisplayName(), "<pre>" + parser.helpText() + "</pre>"); exit(EXIT_SUCCESS);
break;
case CommandLineVersionRequested:
- on_actionAbout_triggered(true); exit(0);
+ on_actionAbout_triggered(true); exit(EXIT_SUCCESS);
break;
case CommandLineOk:
if (!options.outbox_filename.isEmpty())