[Kde-pim] [Differential] [Request, 281 lines] D2189: KSieve: redesign to fix error handling.

dfaure (David Faure) noreply at phabricator.kde.org
Fri Jul 15 23:06:14 BST 2016


dfaure created this revision.
dfaure added reviewers: dvratil, vkrause, mlaurent.
dfaure added a subscriber: KDE PIM.
Restricted Application added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.

REVISION SUMMARY
  - 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.

TEST PLAN
  Editing a sieve script (on mykolab.org, which uses the NO {123} syntax)
  and introducing an error, then using "check syntax" (->error at bottom),
  and OK (->error message box). This also makes "check syntax" show green again
  after fixing the script (previously the first job prevented any other job from running).

REPOSITORY
  rLIBKSIEVE PIM: Sieve Handling Library

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D2189

AFFECTED FILES
  src/kmanagesieve/response.cpp
  src/kmanagesieve/session.cpp
  src/kmanagesieve/session.h
  src/kmanagesieve/sessionthread.cpp
  src/kmanagesieve/sessionthread_p.h
  src/kmanagesieve/sievejob.cpp
  src/kmanagesieve/sievejob.h
  src/kmanagesieve/sievejob_p.h
  src/ksieveui/debug/sievedebugdialog.cpp
  src/ksieveui/managescriptsjob/generateglobalscriptjob.cpp
  src/ksieveui/managescriptsjob/generateglobalscriptjob.h
  src/ksieveui/managescriptsjob/parseuserscriptjob.cpp
  src/ksieveui/managescriptsjob/parseuserscriptjob.h
  src/ksieveui/managesievescriptsdialog.cpp
  src/ksieveui/managesievescriptsdialog.h
  src/ksieveui/vacation/vacation.cpp
  src/ksieveui/vacation/vacationcheckjob.cpp
  src/ksieveui/vacation/vacationcreatescriptjob.cpp
  src/ksieveui/widgets/managesievewidget.cpp
  src/ksieveui/widgets/managesievewidget.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dfaure, dvratil, vkrause, mlaurent
Cc: kde-pim, #kde_pim, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list