KSieve: redesign to fix error handling.

Authored by dfaure on Jul 15 2016, 9:35 PM.

Description

KSieve: redesign to fix error handling.

  • Fix parsing of "NO {123}" (followed by error lines). The thread separation

broke Volker's "feedback" hack^H^H^H^Hdesign, because the state is wrong at the
time the reparsing happens. This syntax is now handled during response parsing
rather than being fed back to the thread.

  • Fix double messagebox on error, because on destruction the job would call

killJob which would emit the error again. To fix this I followed more closely
the KJob API (even though SieveJob isn't a KJob), using the (currently unused)
KillVerbosity argument.

  • Fix some error messages being stored in Session and never shown, now those

are given to the current job. This also goes closer to KJob: errorString()
in the job rather than an errorMessage signal.

  • Finally, remove messageboxes shown by the job itself (and setInteractive(false)

to disable that), let the caller show a messagebox on error if it wants to
(again, more like KJob). This fixes ugly reentrancy problems while the msgbox
is up from within the job code, and allows to customize the error messages better.

Differential Revision: https://phabricator.kde.org/D2189

Details

Committed
dfaureJul 18 2016, 1:02 PM
Differential Revision
D2189: KSieve: redesign to fix error handling.
Parents
R91:d3594c5dfd87: Fix warning when cancelling "Manage Sieve Scripts" dialog.
Branches
Unknown
Tags
Unknown