https://bugs.kde.org/show_bug.cgi?id=507443
Bug ID: 507443 Summary: Progress bar cancellation cannot be detected in script Classification: Applications Product: kdialog Version First unspecified Reported In: Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: br...@frogmouth.net Reporter: burne...@gmail.com Target Milestone: --- SUMMARY kdialog --progressbar can be cancelled by the user, but when it is, this is difficult to detect from a script. The way described in the documentation of querying the wasCancelled property from DBus does not work, because when the user clicks cancel, the progress bar closes, which includes closing its DBus service. It is also difficult if not impossible to get the exit code of the progress bar process itself, because it forks itself and cannot be `wait`ed on. STEPS TO REPRODUCE Try this example from the docs https://develop.kde.org/docs/administration/kdialog/#--progressbar-dialog-box-example-with-cancel dbusRef=`kdialog --progressbar "Press Cancel at Any time" 10` qdbus $dbusRef showCancelButton true until test "true" = `qdbus $dbusRef wasCancelled`; do sleep 1 inc=$((`qdbus $dbusRef Get "" "value"` + 1)) qdbus $dbusRef Set "" "value" $inc; done qdbus $dbusRef close OBSERVED RESULT Clicking Cancel makes the script throw a bunch of errors: Cannot find '.Get' in object /ProgressDialog at org.kde.kdialog-2655344 Cannot find '.Set' in object /ProgressDialog at org.kde.kdialog-2655344 Service 'org.kde.kdialog-2655344' does not exist. ./test.sh: line 6: test: true: unary operator expected EXPECTED RESULT Clicking cancel stops the script. ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.