-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
flameshot gui
exits with 0 on abort
#3321
Comments
same problem |
if i use Lines 65 to 68 in 3d21e49
is there any specific reason that i should avoid that and force us to use qApp->exit(1); ?
|
Question for the developers: How can I run Flameshot from the terminal using the source code? When I launch it from Qt Creator and follow the instructions, I do not receive any messages. However, if I download Flameshot as a standalone program and launch it according to the instructions, I can reproduce. |
you should follow this guide than run flameshot in build directory |
`flameshot gui` exits with 0 on abort, we can use the return value of `qApp->exec()` in `requestCaptureAndWait`.
Since this issue is marked as "Good first issue" by member of flameshot, and I've used flameshot for quite a while and am happy to make some contributions if possible. So I tried read the code and found this simple solution, hope it helps. Please let me know if I was wrong, this is my first pull request (#3786) on my life though. |
Flameshot Version
Flameshot v12.1.0 (-)
Compiled with Qt 5.15.5
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)
Operating System type and version
EndeavourOS, Linux 6.4.12-arch1-1 x86_64
Description
I was trying to use flameshot in scripting, and was surprised to find that
flameshot gui
does not exit with non-zero status when user aborts. This makes scripting quite a bit more annoying.The behaviour I expected is to exit with
1
(or whatever) on abort.Steps to reproduce
flameshot gui
in terminalecho $?
, notice that the status is0
Screenshots or screen recordings
No response
System Information
Operating System: EndeavourOS
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.12-arch1-1 (64-bit)
Graphics Platform: X11
The text was updated successfully, but these errors were encountered: