Move the code that makes an empty quota info form an

invalid one into the quotajob class, and out of 
kmfoldercachedimap, so it works for online imap as
well. (proko2 issue 1186)

svn path=/branches/kdepim/proko2/kdepim/; revision=544380
wilder-work
Till Adam 20 years ago
parent 30405f8174
commit d11d4301ea
  1. 10
      kmfoldercachedimap.cpp
  2. 10
      quotajobs.cpp

@ -2227,16 +2227,6 @@ void KMFolderCachedImap::slotQuotaResult( KIO::Job* job )
}
else
kdWarning(5006) << "slotGetQuotaResult: " << job->errorString() << endl;
} else {
// There was no error, which means the server does support quota, but
// our info is not valid. That means that there is no quota on this folder,
// which we indicate by setting the name to something valid, but leaving the
// values invalid or setting them to invalid, in case we had info there before.
if ( !mQuotaInfo.isValid() ) {
mQuotaInfo = empty;
mQuotaInfo.name = "STORAGE";
writeConfigKeysWhichShouldNotGetOverwrittenByReadConfig();
}
}
if (mAccount->slave()) mAccount->removeJob(job);

@ -116,10 +116,14 @@ QuotaJobs::GetStorageQuotaJob::GetStorageQuotaJob( KIO::Slave* slave, const KURL
void QuotaJobs::GetStorageQuotaJob::slotQuotarootResult( const QStringList& roots )
{
if ( mStorageQuotaInfo.isValid() ) {
emit storageQuotaResult( mStorageQuotaInfo );
if ( !mStorageQuotaInfo.isValid() && !error() ) {
// No error, so the account supports quota, but no usable info
// was transmitted => no quota set on the folder. Make the info
// valid, bit leave it empty.
mStorageQuotaInfo.name = "STORAGE";
}
// emitResult();
if ( mStorageQuotaInfo.isValid() )
emit storageQuotaResult( mStorageQuotaInfo );
}
void QuotaJobs::GetStorageQuotaJob::slotQuotaInfoReceived( const QuotaInfoList& infos )

Loading…
Cancel
Save