mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-26 03:39:34 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user