Exit non-zero when aborting with --raw. (#424)

This fixes #302. Note that I also added a non-zero exit status when DBus
fails to connect.
This commit is contained in:
James LaChance
2018-12-28 10:39:04 -05:00
committed by Dharkael
parent 652689627f
commit 472a275bb9
2 changed files with 5 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ void DBusUtils::connectPrintCapture(QDBusConnection &session, uint id) {
void DBusUtils::checkDBusConnection(const QDBusConnection &connection) {
if (!connection.isConnected()) {
SystemNotification().sendMessage(tr("Unable to connect via DBus"));
qApp->exit();
qApp->exit(1);
}
}
@@ -58,6 +58,6 @@ void DBusUtils::captureTaken(uint id, QByteArray rawImage) {
void DBusUtils::captureFailed(uint id) {
if (m_id == id) {
QTextStream(stdout) << "screenshot aborted\n";
qApp->exit();
qApp->exit(1);
}
}