Revision 0e8c37d...

Go back to digest for 16th March 2014

Features in KDE-PIM

Jan Kundrát committed changes in [trojita] /Imap:

tasks: Better propagation of the reason why this task failed

My original idea at the time this code was written was (IIRC, it's been ages)
roughly something like "well, whatever, use specific signals for propagating
each and every possible error". This was never implemented, of course.

Now, some errors arguably deserve a dedicated signal, but in other circumstances
the fact that something failed is enough; the remedy is usually the same anyway
-- either give up and tell the user that she's got bad luck, or try again later.
Now, it is still useful to at least show the reason to the user. What is missing
here is a piece of code which will let the user know that his mail won't load
because the mailbox couldn't be synced. This will have to come later.

In the meanwhile, let's keep track of the error message so it isn't lost. My
current motivation for this is that the communication between the KeepMailboxOpenTask
and the ObtainSynchronizedMailboxTask uses the standard Tasks API, i.e.
signalling failure via the failed() signal. Instead of extending the API to be
"magic", better add the message to the existing channels.

File Changes

Modified 7 files
  • /Imap
  •   src/Model/Model.cpp
  •   src/TasksTask.cpp
  •   src/TasksTask.h
  •   src/Tasks/KeepMailboxOpenTask.cpp
  •   src/Tasks/KeepMailboxOpenTask.h
  •   src/Tasks/ObtainSynchronizedMailboxTask.cpp
  •   src/Tasks/OfflineConnectionTask.cpp
7 files changed in total