[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 93199] [regression] can't cancel password input
From: Will Stephenson <wstephenson () kde ! org>
Date: 2007-04-14 14:49:59
Message-ID: 20070414144959.30414.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=93199
wstephenson kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From wstephenson kde org 2007-04-14 16:49 -------
SVN commit 653900 by wstephens:
Allow the user to cancel kmail connection attempts when the account
settings are incorrect (Novell bug 247903).
BUG:93199
M +2 -2 kioslaves/imap4/imap4.cc
M +20 -13 kmail/imapaccountbase.cpp
--- branches/KDE/3.5/kdepim/kioslaves/imap4/imap4.cc #653899:653900
@ -2020,14 +2020,14 @
}
}
if (!clientLogin (myUser, myPass, resultInfo))
- error(KIO::ERR_COULD_NOT_LOGIN, i18n("Unable to login. Probably the "
+ error(KIO::ERR_COULD_NOT_AUTHENTICATE, i18n("Unable to login. Probably the "
"password is wrong.\nThe server %1 replied:\n%2").arg(myHost).arg(resultInfo));
}
else
{
#ifdef HAVE_LIBSASL2
if (!clientAuthenticate (this, authInfo, myHost, myAuth, mySSL, resultInfo))
- error(KIO::ERR_COULD_NOT_LOGIN, i18n("Unable to authenticate via %1.\n"
+ error(KIO::ERR_COULD_NOT_AUTHENTICATE, i18n("Unable to authenticate via %1.\n"
"The server %2 replied:\n%3").arg(myAuth).arg(myHost).arg(resultInfo));
else {
myUser = authInfo.username;
--- branches/KDE/3.5/kdepim/kmail/imapaccountbase.cpp #653899:653900
@ -562,19 +562,19 @
if (aSlave != mSlave) return;
handleError( errorCode, errorMsg, 0, QString::null, true );
if ( mAskAgain )
- makeConnection();
- else {
- if ( !mSlaveConnected ) {
- mSlaveConnectionError = true;
- resetConnectionList( this );
- if ( mSlave )
- {
- KIO::Scheduler::disconnectSlave( slave() );
- mSlave = 0;
- }
+ if ( makeConnection() != ImapAccountBase::Error )
+ return;
+
+ if ( !mSlaveConnected ) {
+ mSlaveConnectionError = true;
+ resetConnectionList( this );
+ if ( mSlave )
+ {
+ KIO::Scheduler::disconnectSlave( slave() );
+ mSlave = 0;
}
- emit connectionResult( errorCode, errorMsg );
}
+ emit connectionResult( errorCode, errorMsg );
}
//-----------------------------------------------------------------------------
@ -892,7 +892,7 @
bool jobsKilled = true;
switch( errorCode ) {
case KIO::ERR_SLAVE_DIED: slaveDied(); killAllJobs( true ); break;
- case KIO::ERR_COULD_NOT_LOGIN: // bad password
+ case KIO::ERR_COULD_NOT_AUTHENTICATE: // bad password
mAskAgain = true;
// fallthrough intended
case KIO::ERR_CONNECTION_BROKEN:
@ -901,6 +901,7 @
// These mean that we'll have to reconnect on the next attempt, so disconnect and set mSlave to 0.
killAllJobs( true );
break;
+ case KIO::ERR_COULD_NOT_LOGIN:
case KIO::ERR_USER_CANCELED:
killAllJobs( false );
break;
@ -1042,7 +1043,7 @
msg->deleteBodyParts();
// make the parts and fill the mBodyPartList
constructParts( stream, 1, 0, 0, msg->asDwMessage() );
- if ( mBodyPartList.count() == 1 ) // we directly set the body later
+ if ( mBodyPartList.count() == 1 ) // we directly set the body later, at partsToLoad below
msg->deleteBodyParts();
if ( !as )
@ -1068,6 +1069,12 @
++partsToLoad;
}
}
+ // if the only body part is not text, part->loadPart() would return false
+ // and that part is never loaded, so make sure it loads.
+ // it seems that TEXT does load the single body part even if it is not text/*
+ if ( mBodyPartList.count() == 1 && partsToLoad == 0 )
+ partsToLoad = 1;
+
if ( (mBodyPartList.count() * 0.5) < partsToLoad )
{
// more than 50% of the parts have to be loaded anyway so it is faster
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic