KMail: provide UI feedback when waiting for opened message to be retrieved

Review Request #121091 - Created Nov. 10, 2014 and submitted

Daniel Vrátil

When you double-click a message, the Viewer will not appear until the ItemFetchJob for the selected message finishes. In some situations, this can take a lot of time (for example when the Session is blocked by another ItemFetchJob, that has triggered folder sync). During this time, user has no information about what is happening, and will probably click the message many times. Once Session is unblocked, the user will end up with dozen Viewers for the same message.

This patch makes slotMessageActivated() use a KMCommand, which provides a nice UI feedback when operation takes a bit longer, instead of using ItemFetchJob directly.

The Viewer opens correctly when the ItemFetchJob finishes quickly (without any UI feedback). Comment out the connect()s in kmcommands.cpp on l. 314 and 315 to simulate a long-lasting ItemFetchJob. The "Please wait while the message is transferred" dialog pops up after a while -> user knows what's happening (but of course no Viewer will appear, since the connect() is commented out).

Laurent Montel
Daniel Vrátil
Review request changed

Status: Closed (submitted)