Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ int main(int argc, char *argv[]) {
&QCoreApplication::quit);
t.start();
// wait
app.exec();
return app.exec();
}
}
else if (parser.isSet(fullArgument)) { // FULL
Expand Down Expand Up @@ -282,7 +282,7 @@ int main(int argc, char *argv[]) {
&QCoreApplication::quit);
t.start();
// wait
app.exec();
return app.exec();
}
}
else if (parser.isSet(screenArgument)) { // SCREEN
Expand Down Expand Up @@ -332,7 +332,7 @@ int main(int argc, char *argv[]) {
&QCoreApplication::quit);
t.start();
// wait
app.exec();
return app.exec();
}
}
else if (parser.isSet(configArgument)) { // CONFIG
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dbusutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}