Revision 01d0b20...

Go back to digest for 8th December 2013

Bug Fixes in KDE-PIM

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

Be much more resilient towards re-entering the event loop

Previously, there used to be a rather primitive guard which attempted to keep
stuff from hitting the fan when the event loop was reentered from within a slot
connected to some signal which was emitted by the IMAP event handlers; the
motivation heind this was that some of the followup events might very well break
stuff by e.g. deciding to kill the parser, or perhaps by deleting some tasks.
Unfortunately, the guard was rather primitive and only ever guarded against
reentering the loop once. It was utterly useless when the loop was reentered
multiple times.

One way of triggering the issue was via connecting to a server which refused our
conneciton due to too many attempts (with a cached password). The three
overlapping dialogs proved to be too much for the primitive guard to handle.
Thanks to paalsteek for reporting this.

This change instead makes sure that the signals which are "likely" to have
something connected to them, and where that "something" might be willing to
re-enter the event loop by e.g. using of QMessageBox' static methods, are only
emitted after a while via the Qt::QueuedConnection.

v2: use EMIT_LATER instead of CALL_LATER for cases where it's about emitting
signals as suggested by Thomas during review.

REVIEW: 114337

File Changes

Modified 11 files
  •   src/Common/InvokeMethod.h
  •   tests/Imap/test_Imap_Tasks_CreateMailbox.cpp
  •   tests/Imap/test_Imap_Tasks_DeleteMailbox.cpp
  •   tests/Imap/test_Imap_Tasks_OpenConnection.cpp
  •   src/Imap/Model/Model.cpp
  •   src/Imap/Model/ParserState.cpp
  •   src/Imap/Model/ParserState.h
  •   src/Imap/Tasks/CreateMailboxTask.cpp
  •   src/Imap/Tasks/DeleteMailboxTask.cpp
  •   src/Imap/Tasks/KeepMailboxOpenTask.cpp
  •   src/Imap/Tasks/OpenConnectionTask.cpp
11 files changed in total