Bug 409133

Summary: --export exits with non-zero status on success
Product: [Applications] krita Reporter: Andrei Alexeyev <akari>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: 4.2.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Andrei Alexeyev 2019-06-24 14:20:52 UTC
SUMMARY
Since 4.2 `krita --export` exits with status 1 even though the export succeeds, indicating failure. This breaks some automation scripts that (correctly) consider a non-zero exit status to indicate an error.


STEPS TO REPRODUCE
1. Create and save a Krita document `test.kra` (or pick an existing one)
2. In a terminal run: `krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'`
3. Check test.png and ensure that the export, in fact, was successful.

OBSERVED RESULT

    $ krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'
    Set style "fusion"
    Invalid profile :  "/usr/share/color/icc/colord/Crayons.icc" "Crayon Colors"
    Invalid profile :  "/usr/share/color/icc/colord/x11-colors.icc" "X11 Colors"
    krita.general: Warning: some tiles have leaked:
    krita.general:  Tiles in memory: 258 
            Total tiles: 258
    failure!


EXPECTED RESULT

    $ krita --export --export-filename test.png test.kra && echo 'success!' || echo 'failure!'
    success!

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 1 Halla Rempt 2019-06-24 14:44:24 UTC
Git commit 9d6097e2d7648fa586ea28be59c0aced2485af84 by Boudewijn Rempt.
Committed on 24/06/2019 at 14:44.
Pushed by rempt into branch 'master'.

Return booleans, not ints, so the --export option returns 0 on success

M  +6    -6    libs/ui/KisApplication.cpp

https://invent.kde.org/kde/krita/commit/9d6097e2d7648fa586ea28be59c0aced2485af84
Comment 2 Halla Rempt 2019-07-08 14:59:29 UTC
Git commit 439805df9315cc89b164ea60ce55dee7af5cffb8 by Boudewijn Rempt.
Committed on 08/07/2019 at 14:59.
Pushed by rempt into branch 'krita/4.2'.

Return booleans, not ints, so the --export option returns 0 on success

M  +6    -6    libs/ui/KisApplication.cpp

https://invent.kde.org/kde/krita/commit/439805df9315cc89b164ea60ce55dee7af5cffb8