Revision 6d6476e...
Go back to digest for 22nd January 2012Bug Fixes in KDE-PIM
Rework handling of connection failures, to fix crashes.
Testcase: unplugging my network cable, waiting for timeouts, plugging it
back again later, check mail.
* Port from deprecated connectionLost to stateChanged, which has the major
benefit of not confusing "failure to connect" with "we lost our connection"
(due to KIMAP::Session emitting both signals for compat reasons).
* Failure to connect is now handled in the result slot for the LoginJob,
rather than via the connectionFailed signal, since the first one is called
anyway.
* Make sure we emit connectDone on error, even if m_initialConnectDone is true,
so that the resource sets itself to offline (rather than it attempting the
same task over and over again!).
* Don't set the resource status to Broken when it's simply offline
(login failure due to "could not connect" is handled separately now)
* Make sure not to pop up a password dialog when couldn't connect; this
is different from "we could connect but the server refused login".
Requires kdepimlibs commit acdb0f7e50 for ERR_COULD_NOT_CONNECT.
FIXED-IN: 4.8
(cherry picked from commit 757f464e5de7f992d0bfcb90dc97d4ea40df47d5)
File Changes
- /imap
- resourcesresource.cpp
- resources/sessionpool.cpp
- resources/sessionpool.h
- resources/teststestbase.h
- resources/tests/testsessionpool.cpp