[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kroupware_branch: kdenetwork/kmail
From:       David Faure <faure () kde ! org>
Date:       2003-06-25 23:01:30
[Download RAW message or body]

CVS commit by faure: 

Fix for kroupware issue #241: when entering a wrong password for an IMAP account,
the job wasn't properly terminated, so the syncing 'state machine' was kind of stuck.

The underlying design issue is that KIO's connected slaves emit (via Scheduler) a
signal slaveError, totally unrelated to any job, and that killing the slave
kills the jobs _silently_ (without emitting result()).

As discussed with Waldo, the only way to handle this properly is to wait for the
slave to be connected (slaveConnected signal from Scheduler), before assigning
the slave to a job. I didn't rewrite all of kmail for it :) but I changed the
return value of makeConnection to be an enum: Error, Connected or Connecting.
This keeps compat with existing code which just checks it as a bool, but allows
KMFolderCachedImap to wait for the slaveConnected signal before proceeding.
Visually, this does the connection attempt at 0% progress instead of at 30%,
so it looks more logical :)


  M +25 -6     imapaccountbase.cpp   1.1.2.15
  M +17 -2     imapaccountbase.h   1.1.2.12
  M +9 -12     kmacctcachedimap.cpp   1.1.2.57
  M +1 -1      kmacctcachedimap.h   1.1.2.44
  M +44 -3     kmfoldercachedimap.cpp   1.1.2.87
  M +3 -0      kmfoldercachedimap.h   1.1.2.43



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic