diff options
author | Caleb Tennis <caleb@gentoo.org> | 2006-05-12 12:15:01 +0000 |
---|---|---|
committer | Caleb Tennis <caleb@gentoo.org> | 2006-05-12 12:15:01 +0000 |
commit | 4c598b91a4eb4fd9806d334b9dcfba730c044b17 (patch) | |
tree | e52544cedd4084b0ff19753b59b76eccea6ba859 /kde-base/kmail | |
parent | Stable on SPARC wrt bug #132887. (diff) | |
download | gentoo-2-4c598b91a4eb4fd9806d334b9dcfba730c044b17.tar.gz gentoo-2-4c598b91a4eb4fd9806d334b9dcfba730c044b17.tar.bz2 gentoo-2-4c598b91a4eb4fd9806d334b9dcfba730c044b17.zip |
Two more upstream patches, from Carlo
(Portage version: 2.1_pre10-r5)
Diffstat (limited to 'kde-base/kmail')
-rw-r--r-- | kde-base/kmail/ChangeLog | 9 | ||||
-rw-r--r-- | kde-base/kmail/files/digest-kmail-3.4.1 | 4 | ||||
-rw-r--r-- | kde-base/kmail/files/digest-kmail-3.4.1-r1 | 4 | ||||
-rw-r--r-- | kde-base/kmail/files/digest-kmail-3.4.2 | 4 | ||||
-rw-r--r-- | kde-base/kmail/files/digest-kmail-3.4.2-r1 | 4 | ||||
-rw-r--r-- | kde-base/kmail/files/digest-kmail-3.5.2-r3 | 3 | ||||
-rw-r--r-- | kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff | 434 | ||||
-rw-r--r-- | kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff | 329 | ||||
-rw-r--r-- | kde-base/kmail/kmail-3.5.2-r3.ebuild | 71 |
9 files changed, 857 insertions, 5 deletions
diff --git a/kde-base/kmail/ChangeLog b/kde-base/kmail/ChangeLog index 64d1acaa04c0..eda7eb2fbed9 100644 --- a/kde-base/kmail/ChangeLog +++ b/kde-base/kmail/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kmail # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.58 2006/05/01 16:46:38 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.59 2006/05/12 12:15:01 caleb Exp $ + +*kmail-3.5.2-r3 (12 May 2006) + + 12 May 2006; Caleb Tennis <caleb@gentoo.org> + +files/kmail-3.5.2-imap-fixes-2.diff, + +files/kmail-3.5.2-misc-fixes-2.diff, +kmail-3.5.2-r3.ebuild: + Two more upstream patches, from Carlo 01 May 2006; Diego Pettenò <flameeyes@gentoo.org> kmail-3.5.2-r2.ebuild: Build indexlib as convenience library and don't install it. diff --git a/kde-base/kmail/files/digest-kmail-3.4.1 b/kde-base/kmail/files/digest-kmail-3.4.1 index 1ff7d92e997f..2786a50571aa 100644 --- a/kde-base/kmail/files/digest-kmail-3.4.1 +++ b/kde-base/kmail/files/digest-kmail-3.4.1 @@ -1,3 +1,5 @@ -MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 MD5 dea739570f660581aac9d264f5ab7c17 kdepim-3.4.0-3.4.1.tar.xdelta 689503 +MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 +RMD160 abc3794c45f12e29b3dc8ce3c4b570e980beb8c3 kdepim-3.4.0.tar.bz2 11441545 +SHA256 7769e1989404c16d679c0be32cde7634ceb5692131de6ab1d44def47eca871ad kdepim-3.4.0.tar.bz2 11441545 MD5 e5515aa230558bac8651e9cd9f8f9673 kdepim-3.4.1.tar.bz2 11345538 diff --git a/kde-base/kmail/files/digest-kmail-3.4.1-r1 b/kde-base/kmail/files/digest-kmail-3.4.1-r1 index 1ff7d92e997f..2786a50571aa 100644 --- a/kde-base/kmail/files/digest-kmail-3.4.1-r1 +++ b/kde-base/kmail/files/digest-kmail-3.4.1-r1 @@ -1,3 +1,5 @@ -MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 MD5 dea739570f660581aac9d264f5ab7c17 kdepim-3.4.0-3.4.1.tar.xdelta 689503 +MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 +RMD160 abc3794c45f12e29b3dc8ce3c4b570e980beb8c3 kdepim-3.4.0.tar.bz2 11441545 +SHA256 7769e1989404c16d679c0be32cde7634ceb5692131de6ab1d44def47eca871ad kdepim-3.4.0.tar.bz2 11441545 MD5 e5515aa230558bac8651e9cd9f8f9673 kdepim-3.4.1.tar.bz2 11345538 diff --git a/kde-base/kmail/files/digest-kmail-3.4.2 b/kde-base/kmail/files/digest-kmail-3.4.2 index d02c378923af..e844e70cf841 100644 --- a/kde-base/kmail/files/digest-kmail-3.4.2 +++ b/kde-base/kmail/files/digest-kmail-3.4.2 @@ -1,4 +1,6 @@ -MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 MD5 dea739570f660581aac9d264f5ab7c17 kdepim-3.4.0-3.4.1.tar.xdelta 689503 +MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 +RMD160 abc3794c45f12e29b3dc8ce3c4b570e980beb8c3 kdepim-3.4.0.tar.bz2 11441545 +SHA256 7769e1989404c16d679c0be32cde7634ceb5692131de6ab1d44def47eca871ad kdepim-3.4.0.tar.bz2 11441545 MD5 bed079698df3b9d211e032814965b083 kdepim-3.4.1-3.4.2.tar.xdelta 534400 MD5 e7bd012faa559bcf2a949b6a8ed5ff7f kdepim-3.4.2.tar.bz2 11368492 diff --git a/kde-base/kmail/files/digest-kmail-3.4.2-r1 b/kde-base/kmail/files/digest-kmail-3.4.2-r1 index d02c378923af..e844e70cf841 100644 --- a/kde-base/kmail/files/digest-kmail-3.4.2-r1 +++ b/kde-base/kmail/files/digest-kmail-3.4.2-r1 @@ -1,4 +1,6 @@ -MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 MD5 dea739570f660581aac9d264f5ab7c17 kdepim-3.4.0-3.4.1.tar.xdelta 689503 +MD5 7f8cc9a40c0190c5a6723f6325bcba06 kdepim-3.4.0.tar.bz2 11441545 +RMD160 abc3794c45f12e29b3dc8ce3c4b570e980beb8c3 kdepim-3.4.0.tar.bz2 11441545 +SHA256 7769e1989404c16d679c0be32cde7634ceb5692131de6ab1d44def47eca871ad kdepim-3.4.0.tar.bz2 11441545 MD5 bed079698df3b9d211e032814965b083 kdepim-3.4.1-3.4.2.tar.xdelta 534400 MD5 e7bd012faa559bcf2a949b6a8ed5ff7f kdepim-3.4.2.tar.bz2 11368492 diff --git a/kde-base/kmail/files/digest-kmail-3.5.2-r3 b/kde-base/kmail/files/digest-kmail-3.5.2-r3 new file mode 100644 index 000000000000..614bd87074cf --- /dev/null +++ b/kde-base/kmail/files/digest-kmail-3.5.2-r3 @@ -0,0 +1,3 @@ +MD5 ac6b3b503e27a65a7b883c1e0a57262e kdepim-3.5.2.tar.bz2 12887336 +RMD160 8e6571d14bbf6b3370c4fdb108a1a79625e87365 kdepim-3.5.2.tar.bz2 12887336 +SHA256 9c038a80912894b3ec132b2c7219ec5549ca80dcdeec88555928d2e038966539 kdepim-3.5.2.tar.bz2 12887336 diff --git a/kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff b/kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff new file mode 100644 index 000000000000..f8d7326327f9 --- /dev/null +++ b/kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff @@ -0,0 +1,434 @@ +--- kdepim/kmail/kmheaders.cpp 2006/03/02 12:26:51 515022 ++++ kdepim/kmail/kmheaders.cpp 2006/04/22 08:13:05 532593 +@@ -1841,7 +1841,7 @@ + bool foundUnreadMessage = false; + + if (!mFolder) return -1; +- if (!(mFolder->count()) > 0) return -1; ++ if (mFolder->count() <= 0) return -1; + + if ((aStartAt >= 0) && (aStartAt < (int)mItems.size())) + item = mItems[aStartAt]; +@@ -2041,7 +2041,7 @@ + + int idx = item->msgId(); + KMMessage *msg = mFolder->getMsg(idx); +- if (!msg->transferInProgress()) ++ if (msg && !msg->transferInProgress()) + { + emit activated(mFolder->getMsg(idx)); + } +@@ -3280,7 +3280,8 @@ + unlink(QFile::encodeName(sortFile)); + kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl; + kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl; +- //kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile )); ++ ++ return true; + } + if(sortStream) + fclose(sortStream); +--- kdepim/kmail/imapaccountbase.cpp 2006/02/23 14:32:38 512746 ++++ kdepim/kmail/imapaccountbase.cpp 2006/04/15 13:05:11 530119 +@@ -1098,10 +1098,10 @@ + { + DwBodyPart* newparent = dwpart; + const DwMessage* newmsg = dwmsg; +- if ( part->originalContentTypeStr() == "MESSAGE/RFC822" && ++ if ( part->originalContentTypeStr() == "MESSAGE/RFC822" && dwpart && + dwpart->Body().Message() ) + { +- // set the encapsulated message as new parent message ++ // set the encapsulated message as the new message + newparent = 0; + newmsg = dwpart->Body().Message(); + } +@@ -1281,7 +1281,8 @@ + if ( delim.isEmpty() ) { + delim = "/"; + } +- if ( !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) { ++ if ( !newName.isEmpty() && ++ !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) { + newName = newName + delim; + } + newName = newName + folderName; +--- kdepim/kmail/kmfolderimap.cpp 2006/03/15 14:19:26 518857 ++++ kdepim/kmail/kmfolderimap.cpp 2006/04/15 13:05:11 530119 +@@ -110,6 +110,11 @@ + if (mOpenCount <= 0 ) return; + if (mOpenCount > 0) mOpenCount--; + if (mOpenCount > 0 && !aForced) return; ++ if (isSelected() && !aForced) { ++ kdWarning(5006) << "Trying to close the selected folder " << label() << ++ " - ignoring!" << endl; ++ return; ++ } + // FIXME is this still needed? + if (mAccount) + mAccount->ignoreJobsForFolder( folder() ); +@@ -873,8 +878,10 @@ + } + kmkernel->imapFolderMgr()->contentsChanged(); + } +- f->initializeFrom( this, "/INBOX/", "message/directory" ); +- f->setChildrenState( QString::null ); ++ if ( f ) { ++ f->initializeFrom( this, "/INBOX/", "message/directory" ); ++ f->setChildrenState( QString::null ); ++ } + // so we have an INBOX + mAccount->setHasInbox( true ); + } +@@ -1086,17 +1093,20 @@ + int a = cstr.find("X-uidValidity: "); + int b = cstr.find("\r\n", a); + QString uidv; +- if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15); ++ if ( (b - a - 15) >= 0 ) ++ uidv = cstr.mid(a + 15, b - a - 15); + a = cstr.find("X-Access: "); + b = cstr.find("\r\n", a); + QString access; +- if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10); ++ if ( (b - a - 10) >= 0 ) ++ access = cstr.mid(a + 10, b - a - 10); + mReadOnly = access == "Read only"; + a = cstr.find("X-Count: "); + b = cstr.find("\r\n", a); + int exists = -1; +- bool ok; +- if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok); ++ bool ok = false; ++ if ( (b - a - 9) >= 0 ) ++ exists = cstr.mid(a + 9, b - a - 9).toInt(&ok); + if ( !ok ) exists = -1; + QString startUid; + if (uidValidity() != uidv) +--- kdepim/kmail/kmfoldercachedimap.cpp 2006/02/11 22:39:04 508499 ++++ kdepim/kmail/kmfoldercachedimap.cpp 2006/05/01 18:24:21 536266 +@@ -539,8 +539,11 @@ + mRecurse = recurse; + assert( account() ); + +- mAccount->mailCheckProgressItem()->reset(); +- mAccount->mailCheckProgressItem()->setTotalItems( 100 ); ++ ProgressItem *progressItem = mAccount->mailCheckProgressItem(); ++ if ( progressItem ) { ++ progressItem->reset(); ++ progressItem->setTotalItems( 100 ); ++ } + mProgress = 0; + + #if 0 +@@ -1115,12 +1118,12 @@ + job->start(); + return; + } else { +- const QString msg ( i18n( "<p>There are new messages in this folder, which " ++ const QString msg ( i18n( "<p>There are new messages in this folder (%1), which " + "have not been uploaded to the server yet, but you do not seem to " + "have sufficient access rights on the folder now to upload them. " + "Please contact your administrator to allow upload of new messages " + "to you, or move them out of this folder.</p> " +- "<p>Do you want to move these messages to another folder now?</p>") ); ++ "<p>Do you want to move these messages to another folder now?</p>").arg( folder()->prettyURL() ) ); + if ( KMessageBox::warningYesNo( 0, msg, QString::null, i18n("Move"), i18n("Do Not Move") ) == KMessageBox::Yes ) { + KMail::KMFolderSelDlg dlg( kmkernel->getKMMainWidget(), + i18n("Move Messages to Folder"), true ); +@@ -1746,11 +1749,14 @@ + f = static_cast<KMFolderCachedImap*>(newFolder->storage()); + } + } +- f->setAccount( mAccount ); +- f->setImapPath( "/INBOX/" ); +- f->folder()->setLabel( i18n("inbox") ); ++ if ( f ) { ++ f->setAccount( mAccount ); ++ f->setImapPath( "/INBOX/" ); ++ f->folder()->setLabel( i18n("inbox") ); ++ } + if (!node) { +- f->close(); ++ if ( f ) ++ f->close(); + kmkernel->dimapFolderMgr()->contentsChanged(); + } + // so we have an INBOX +--- kdepim/kmail/kmfoldertree.cpp 2006/02/13 20:29:00 509156 ++++ kdepim/kmail/kmfoldertree.cpp 2006/04/28 09:54:26 534978 +@@ -139,7 +139,7 @@ + KIconLoader * il = KGlobal::instance()->iconLoader(); + QPixmap pm = il->loadIcon( icon, KIcon::Small, size, + KIcon::DefaultState, 0, true ); +- if ( pm.isNull() ) { ++ if ( mFolder && pm.isNull() ) { + pm = il->loadIcon( mFolder->normalIconPath(), KIcon::Small, size, + KIcon::DefaultState, 0, true ); + } +@@ -157,7 +157,7 @@ + pm = normalIcon( size ); + + KIconLoader * il = KGlobal::instance()->iconLoader(); +- if ( mFolder->useCustomIcons() ) { ++ if ( mFolder && mFolder->useCustomIcons() ) { + pm = il->loadIcon( mFolder->unreadIconPath(), KIcon::Small, size, + KIcon::DefaultState, 0, true ); + if ( pm.isNull() ) +@@ -1020,10 +1020,10 @@ + mMainWidget->action("compact")->plug(folderMenu); + + folderMenu->insertSeparator(); +- if ( !fti->folder()->isSystemFolder() ) ++ if ( !fti->folder()->isSystemFolder() ) { + mMainWidget->action("delete_folder")->plug(folderMenu); +- +- folderMenu->insertSeparator(); ++ folderMenu->insertSeparator(); ++ } + mMainWidget->action("empty")->plug(folderMenu); + folderMenu->insertSeparator(); + } +@@ -1472,7 +1472,7 @@ + + KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); + +- if (fti && fti->folder() && col != 0 && !currentFolder()->child()) ++ if ((!fti) || (fti && fti->folder() && col != 0 && !currentFolder()->child())) + return; + + QString fldName, oldFldName; +@@ -1546,10 +1546,12 @@ + + // get the unread count + int count = 0; +- if (folder->noContent()) // always empty ++ if (folder && folder->noContent()) // always empty + count = -1; +- else +- count = fti->folder()->countUnread(); ++ else { ++ if ( fti->folder() ) ++ count = fti->folder()->countUnread(); ++ } + + // set it + bool repaint = false; +@@ -1848,6 +1850,9 @@ + void KMFolderTree::moveFolder( KMFolder* destination ) + { + KMFolder* folder = currentFolder(); ++ if (!folder) ++ return; ++ + KMFolderDir* parent = &(kmkernel->folderMgr()->dir()); + if ( destination ) + parent = destination->createChildFolder(); +@@ -1857,7 +1862,7 @@ + + KMFolderDir* folderDir = parent; + // check that the folder can be moved +- if ( folder && folder->child() ) ++ if ( folder->child() ) + { + while ( folderDir && ( folderDir != &kmkernel->folderMgr()->dir() ) && + ( folderDir != folder->parent() ) ) +@@ -1871,13 +1876,13 @@ + } + } + +- if( folder && folder->child() && parent && ++ if( folder->child() && parent && + ( parent->path().find( folder->child()->path() + "/" ) == 0 ) ) { + KMessageBox::error( this, message ); + return; + } + +- if( folder && folder->child() ++ if( folder->child() + && ( parent == folder->child() ) ) { + KMessageBox::error( this, message ); + return; +--- kdepim/kmail/imapjob.cpp 2005/08/12 17:17:32 446148 ++++ kdepim/kmail/imapjob.cpp 2006/05/04 21:30:58 537478 +@@ -97,11 +97,12 @@ + // imap folder, use its account for keeping track of the job. Otherwise, + // this is a get job and the src folder is an imap one. Use its account + // then. +- KMAcctImap *account; ++ KMAcctImap *account = 0; + if (folder) { + account = folder->account(); + } else { +- account = static_cast<KMFolderImap*>(msg_parent->storage())->account(); ++ if ( msg_parent && msg_parent->storage() ) ++ account = static_cast<KMFolderImap*>(msg_parent->storage())->account(); + } + if ( !account || + account->makeConnection() == ImapAccountBase::Error ) { +@@ -127,7 +128,7 @@ + url.setPath( folder->imapPath() + ";SECTION=" + flags ); + ImapAccountBase::jobData jd; + jd.parent = 0; jd.offset = 0; jd.done = 0; +- jd.total = ( curMsg->msgSizeServer() > 0 ) ? ++ jd.total = ( curMsg->msgSizeServer() > 0 ) ? + curMsg->msgSizeServer() : curMsg->msgSize(); + jd.msgList.append( curMsg ); + QCString cstr( curMsg->asString() ); +@@ -192,7 +193,7 @@ + "ImapJobCopyMove"+ProgressManager::getUniqueID(), + i18n("Server operation"), + i18n("Source folder: %1 - Destination folder: %2") +- .arg( msg_parent->prettyURL(), ++ .arg( msg_parent->prettyURL(), + mDestFolder->prettyURL() ), + true, + account->useSSL() || account->useTLS() ); +@@ -223,21 +224,23 @@ + if ( mDestFolder ) + { + KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account(); +- if ( account && mJob ) { +- ImapAccountBase::JobIterator it = account->findJob( mJob ); +- if ( it != account->jobsEnd() ) { +- if( (*it).progressItem ) { +- (*it).progressItem->setComplete(); +- (*it).progressItem = 0; +- } +- if ( !(*it).msgList.isEmpty() ) { +- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) +- mit.current()->setTransferInProgress( false ); ++ if ( account ) { ++ if ( mJob ) { ++ ImapAccountBase::JobIterator it = account->findJob( mJob ); ++ if ( it != account->jobsEnd() ) { ++ if( (*it).progressItem ) { ++ (*it).progressItem->setComplete(); ++ (*it).progressItem = 0; ++ } ++ if ( !(*it).msgList.isEmpty() ) { ++ for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) ++ mit.current()->setTransferInProgress( false ); ++ } + } ++ account->removeJob( mJob ); + } +- account->removeJob( mJob ); ++ account->mJobList.remove( this ); + } +- account->mJobList.remove( this ); + mDestFolder->close(); + } + +@@ -245,21 +248,23 @@ + if (!mDestFolder || mDestFolder != mSrcFolder) { + if (! (mSrcFolder->folderType() == KMFolderTypeImap) ) return; + KMAcctImap *account = static_cast<KMFolderImap*>(mSrcFolder->storage())->account(); +- if ( account && mJob ) { +- ImapAccountBase::JobIterator it = account->findJob( mJob ); +- if ( it != account->jobsEnd() ) { +- if( (*it).progressItem ) { +- (*it).progressItem->setComplete(); +- (*it).progressItem = 0; +- } +- if ( !(*it).msgList.isEmpty() ) { +- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) +- mit.current()->setTransferInProgress( false ); ++ if ( account ) { ++ if ( mJob ) { ++ ImapAccountBase::JobIterator it = account->findJob( mJob ); ++ if ( it != account->jobsEnd() ) { ++ if( (*it).progressItem ) { ++ (*it).progressItem->setComplete(); ++ (*it).progressItem = 0; ++ } ++ if ( !(*it).msgList.isEmpty() ) { ++ for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit ) ++ mit.current()->setTransferInProgress( false ); ++ } + } ++ account->removeJob( mJob ); // remove the associated kio job + } +- account->removeJob( mJob ); // remove the associated kio job ++ account->mJobList.remove( this ); // remove the folderjob + } +- account->mJobList.remove( this ); // remove the folderjob + } + mSrcFolder->close(); + } +@@ -270,15 +275,15 @@ + void ImapJob::slotGetNextMessage() + { + KMMessage *msg = mMsgList.first(); +- KMFolderImap *msgParent = static_cast<KMFolderImap*>(msg->storage()); +- KMAcctImap *account = msgParent->account(); +- if ( msg->UID() == 0 ) ++ KMFolderImap *msgParent = msg ? static_cast<KMFolderImap*>(msg->storage()) : 0; ++ if ( !msgParent || msg->UID() == 0 ) + { + // broken message + emit messageRetrieved( 0 ); + deleteLater(); + return; + } ++ KMAcctImap *account = msgParent->account(); + KURL url = account->getUrl(); + QString path = msgParent->imapPath() + ";UID=" + QString::number(msg->UID()); + ImapAccountBase::jobData jd; +@@ -391,7 +396,7 @@ + dataSize = Util::crlf2lf( (*it).data.data(), dataSize ); // always <= + (*it).data.resize( dataSize ); + +- // During the construction of the message from the byteArray it does ++ // During the construction of the message from the byteArray it does + // not have a uid. Therefore we have to make sure that no connected + // slots are called, since they would operate on uid == 0. + msg->parent()->storage()->blockSignals( true ); +@@ -445,7 +450,7 @@ + parent->ignoreJobsForMessage( msg ); + int idx = parent->find( msg ); + if (idx != -1) parent->removeMsg( idx, true ); +- // the removeMsg will unGet the message, which will delete all ++ // the removeMsg will unGet the message, which will delete all + // jobs, including this one + return; + } +--- kdepim/kmail/kmacctcachedimap.cpp 2005/07/26 18:54:59 438982 ++++ kdepim/kmail/kmacctcachedimap.cpp 2006/05/06 09:14:35 537923 +@@ -381,14 +381,14 @@ + //----------------------------------------------------------------------------- + void KMAcctCachedImap::addDeletedFolder( KMFolder* folder ) + { +- if ( folder->folderType() != KMFolderTypeCachedImap ) ++ if ( !folder || folder->folderType() != KMFolderTypeCachedImap ) + return; + KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(folder->storage()); + addDeletedFolder( storage->imapPath() ); + kdDebug(5006) << k_funcinfo << storage->imapPath() << endl; + + // Add all child folders too +- if( folder && folder->child() ) { ++ if( folder->child() ) { + KMFolderNode *node = folder->child()->first(); + while( node ) { + if( !node->isDir() ) { +--- kdepim/kmail/kmcommands.cpp 2006/03/14 20:17:40 518656 ++++ kdepim/kmail/kmcommands.cpp 2006/05/06 09:14:35 537923 +@@ -1724,7 +1724,7 @@ + msg = srcFolder->getMsg(idx); + } + +- if (srcFolder && ++ if (srcFolder && mDestFolder && + (srcFolder->folderType()== KMFolderTypeImap) && + (mDestFolder->folderType() == KMFolderTypeImap) && + (static_cast<KMFolderImap*>(srcFolder->storage())->account() == +@@ -1761,7 +1761,7 @@ + } + } + +- if (!isMessage && list.isEmpty()) ++ if (srcFolder && !isMessage && list.isEmpty()) + { + assert(idx != -1); + srcFolder->unGetMsg( idx ); diff --git a/kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff b/kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff new file mode 100644 index 000000000000..f05626b998f5 --- /dev/null +++ b/kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff @@ -0,0 +1,329 @@ +--- kdepim/kmail/attachmentlistview.cpp 2005/07/26 18:54:59 438982 ++++ kdepim/kmail/attachmentlistview.cpp 2006/04/15 06:51:13 530022 +@@ -92,7 +92,7 @@ + QBuffer serNumBuffer( serNums ); + serNumBuffer.open( IO_ReadOnly ); + QDataStream serNumStream( &serNumBuffer ); +- unsigned long serNum; ++ Q_UINT32 serNum; + KMFolder *folder = 0; + int idx; + QPtrList<KMMsgBase> messageList; +--- kdepim/kmail/kmedit.cpp 2006/02/20 11:40:20 511574 ++++ kdepim/kmail/kmedit.cpp 2006/04/15 06:51:13 530022 +@@ -144,7 +144,7 @@ + QBuffer serNumBuffer(serNums); + serNumBuffer.open(IO_ReadOnly); + QDataStream serNumStream(&serNumBuffer); +- unsigned long serNum; ++ Q_UINT32 serNum; + KMFolder *folder = 0; + int idx; + QPtrList<KMMsgBase> messageList; +--- kdepim/kmail/kmkernel.cpp 2006/04/09 09:53:18 527760 ++++ kdepim/kmail/kmkernel.cpp 2006/04/09 09:53:52 527761 +@@ -1463,6 +1463,9 @@ + + void KMKernel::readConfig() + { ++ //Needed here, since this function is also called when the configuration ++ //changes, and the static variables should be updated then - IOF ++ KMMessage::readConfig(); + } + + void KMKernel::cleanupImapFolders() +--- kdepim/kmail/kmmsgbase.cpp 2006/01/11 14:34:42 496941 ++++ kdepim/kmail/kmmsgbase.cpp 2006/04/15 13:05:11 530119 +@@ -870,7 +870,7 @@ + + char *l; + for ( l = latin.data(); *l; ++l ) { +- if ( ( *l & 0xE0 == 0 ) || ( *l & 0x80 ) ) ++ if ( ( ( *l & 0xE0 ) == 0 ) || ( *l & 0x80 ) ) + // *l is control character or 8-bit char + break; + } +--- kdepim/kmail/kmmsgdict.cpp 2005/07/26 18:54:59 438982 ++++ kdepim/kmail/kmmsgdict.cpp 2006/04/15 13:05:11 530119 +@@ -205,7 +205,16 @@ + } + + KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() ); +- if (folder && index == -1) ++ if ( !folder ) { ++ kdDebug(5006) << "KMMsgDict::insert: Cannot insert the message, " ++ << "null pointer to storage. Requested serial: " << msgSerNum ++ << endl; ++ kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: " ++ << msg->toStrip() << ", Date: " << msg->dateStr() << endl; ++ return 0; ++ } ++ ++ if (index == -1) + index = folder->find(msg); + + // Should not happen, indicates id file corruption +@@ -241,7 +250,16 @@ + const KMMsgBase *msg, int index) + { + KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() ); +- if ( folder && index == -1 ) ++ if ( !folder ) { ++ kdDebug(5006) << "KMMsgDict::replace: Cannot replace the message serial " ++ << "number, null pointer to storage. Requested serial: " << msgSerNum ++ << endl; ++ kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: " ++ << msg->toStrip() << ", Date: " << msg->dateStr() << endl; ++ return; ++ } ++ ++ if ( index == -1 ) + index = folder->find( msg ); + + remove( msgSerNum ); +--- kdepim/kmail/renamejob.cpp 2005/12/10 04:41:02 487311 ++++ kdepim/kmail/renamejob.cpp 2006/04/15 13:05:11 530119 +@@ -59,11 +59,13 @@ + mNewName( newName ), mNewFolder( 0 ) + { + mStorageTempOpened = 0; +- mOldName = storage->name(); +- if ( storage->folderType() == KMFolderTypeImap ) { +- mOldImapPath = static_cast<KMFolderImap*>(storage)->imapPath(); +- } else if ( storage->folderType() == KMFolderTypeCachedImap ) { +- mOldImapPath = static_cast<KMFolderCachedImap*>(storage)->imapPath(); ++ if ( storage ) { ++ mOldName = storage->name(); ++ if ( storage->folderType() == KMFolderTypeImap ) { ++ mOldImapPath = static_cast<KMFolderImap*>(storage)->imapPath(); ++ } else if ( storage->folderType() == KMFolderTypeCachedImap ) { ++ mOldImapPath = static_cast<KMFolderCachedImap*>(storage)->imapPath(); ++ } + } + } + +--- kdepim/kmail/configuredialog_p.h 2005/08/19 15:04:44 450950 ++++ kdepim/kmail/configuredialog_p.h 2006/04/01 23:19:36 525407 +@@ -715,8 +715,7 @@ + void slotOutlookCompatibleClicked(); + + private: +- //virtual void doLoadFromGlobalSettings(); +- virtual void doLoadOther(); ++ virtual void doLoadFromGlobalSettings(); + //FIXME virtual void doResetToDefaultsOther(); + + private: +--- kdepim/kmail/replyphrases.kcfg 2006/04/09 09:53:18 527760 ++++ kdepim/kmail/replyphrases.kcfg 2006/04/09 09:53:52 527761 +@@ -20,17 +20,14 @@ + <entry name="PhraseForward" type="String" key="phrase-forward"> + <label></label> + <whatsthis></whatsthis> +- <default>Forwarded Message</default> + </entry> + <entry name="PhraseReplySender" type="String" key="phrase-reply"> + <label></label> + <whatsthis></whatsthis> +- <default>On %D, you wrote:</default> + </entry> + <entry name="PhraseReplyAll" type="String" key="phrase-reply-all"> + <label></label> + <whatsthis></whatsthis> +- <default>On %D, %F wrote:</default> + </entry> + + </group> +--- kdepim/kmail/kmfolder.cpp 2005/12/06 21:29:44 486141 ++++ kdepim/kmail/kmfolder.cpp 2006/04/18 20:41:15 531267 +@@ -84,12 +84,6 @@ + } + } + +- // trigger from here, since it needs a fully constructed FolderStorage +- if ( mExportsSernums ) +- mStorage->registerWithMessageDict(); +- if ( !mHasIndex ) +- mStorage->setAutoCreateIndex( false ); +- + if ( aParent ) { + connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ), + aParent->manager(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) ); +@@ -133,8 +127,16 @@ + this, SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) ); + + //FIXME: Centralize all the readConfig calls somehow - Zack ++ // Meanwhile, readConfig must be done before registerWithMessageDict, since ++ // that one can call writeConfig in some circumstances - David + mStorage->readConfig(); + ++ // trigger from here, since it needs a fully constructed FolderStorage ++ if ( mExportsSernums ) ++ mStorage->registerWithMessageDict(); ++ if ( !mHasIndex ) ++ mStorage->setAutoCreateIndex( false ); ++ + if ( mId == 0 && aParent ) + mId = aParent->manager()->createId(); + } +--- kdepim/kmail/configuredialog.cpp 2006/01/21 12:34:03 500799 ++++ kdepim/kmail/configuredialog.cpp 2006/05/03 08:46:45 536841 +@@ -2276,7 +2276,7 @@ + const QString encoding = KGlobal::charsets()->encodingForName(*it); + if ( encoding == "iso-8859-15" ) + indexOfLatin9 = i; +- if( false && encoding == currentEncoding ) ++ if( encoding == currentEncoding ) + { + mCharsetCombo->setCurrentItem( i ); + found = true; +@@ -3348,15 +3348,12 @@ + mAttachWordsListEditor, SLOT(setEnabled(bool)) ); + } + +-void ComposerPage::AttachmentsTab::doLoadOther() { +- KConfigGroup composer( KMKernel::config(), "Composer" ); +- ++void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() { + mOutlookCompatibleCheck->setChecked( +- composer.readBoolEntry( "outlook-compatible-attachments", false ) ); ++ GlobalSettings::self()->outlookCompatibleAttachments() ); + mMissingAttachmentDetectionCheck->setChecked( +- composer.readBoolEntry( "showForgottenAttachmentWarning", true ) ); +- QStringList attachWordsList = +- composer.readListEntry( "attachment-keywords" ); ++ GlobalSettings::self()->showForgottenAttachmentWarning() ); ++ QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords(); + if ( attachWordsList.isEmpty() ) { + // default value + attachWordsList << QString::fromLatin1("attachment") +@@ -3371,13 +3368,12 @@ + } + + void ComposerPage::AttachmentsTab::save() { +- KConfigGroup composer( KMKernel::config(), "Composer" ); +- composer.writeEntry( "outlook-compatible-attachments", +- mOutlookCompatibleCheck->isChecked() ); +- composer.writeEntry( "showForgottenAttachmentWarning", +- mMissingAttachmentDetectionCheck->isChecked() ); +- composer.writeEntry( "attachment-keywords", +- mAttachWordsListEditor->stringList() ); ++ GlobalSettings::self()->setOutlookCompatibleAttachments( ++ mOutlookCompatibleCheck->isChecked() ); ++ GlobalSettings::self()->setShowForgottenAttachmentWarning( ++ mMissingAttachmentDetectionCheck->isChecked() ); ++ GlobalSettings::self()->setAttachmentKeywords( ++ mAttachWordsListEditor->stringList() ); + } + + void ComposerPageAttachmentsTab::slotOutlookCompatibleClicked() +--- kdepim/kmail/antispamwizard.cpp 2005/12/30 00:15:02 492457 ++++ kdepim/kmail/antispamwizard.cpp 2006/05/06 09:14:35 537923 +@@ -502,7 +502,7 @@ + while ( account ) { + if ( account->type() == "pop" || account->type().contains( "imap" ) ) { + const NetworkAccount * n = dynamic_cast<const NetworkAccount*>( account ); +- if ( n->host().lower().contains( pattern.lower() ) ) { ++ if ( n && n->host().lower().contains( pattern.lower() ) ) { + mInfoPage->addAvailableTool( (*it).getVisibleName() ); + found = true; + } +--- kdepim/kmail/kmmessage.cpp 2006/03/16 12:47:35 519171 ++++ kdepim/kmail/kmmessage.cpp 2006/05/06 09:14:35 537923 +@@ -2667,7 +2667,7 @@ + parts.removeLast(); + } + +- if (part->Body().Message() && ++ if (part && part->Body().Message() && + part->Body().Message()->Body().FirstBodyPart()) + { + part = part->Body().Message()->Body().FirstBodyPart(); +--- kdepim/kmail/kmreaderwin.cpp 2006/02/20 20:15:05 511744 ++++ kdepim/kmail/kmreaderwin.cpp 2006/05/06 09:14:35 537923 +@@ -371,7 +371,7 @@ + if( dataNode->parentNode() && !weAreReplacingTheRootNode ) { + kdDebug(5006) << "dataNode is NOT replacing the root node: Store the headers." << endl; + resultingData += headers->AsString().c_str(); +- } else if( weAreReplacingTheRootNode && part->hasHeaders() ){ ++ } else if( weAreReplacingTheRootNode && part && part->hasHeaders() ){ + kdDebug(5006) << "dataNode replace the root node: Do NOT store the headers but change" << endl; + kdDebug(5006) << " the Message's headers accordingly." << endl; + kdDebug(5006) << " old Content-Type = " << rootHeaders.ContentType().AsString().c_str() << endl; +--- kdepim/kmail/kmsender.cpp 2006/03/20 17:51:08 520754 ++++ kdepim/kmail/kmsender.cpp 2006/05/06 09:14:35 537923 +@@ -373,12 +373,14 @@ + KMessageBox::information(0, i18n("Critical error: " + "Unable to process sent mail (out of space?)" + "Moving failing message to \"sent-mail\" folder.")); +- sentFolder->moveMsg(mCurrentMsg); +- sentFolder->close(); ++ if ( sentFolder ) { ++ sentFolder->moveMsg(mCurrentMsg); ++ sentFolder->close(); ++ } + cleanup(); + return; + case 1: +- if (sentFolder->moveMsg(mCurrentMsg) != 0) ++ if ( sentFolder && sentFolder->moveMsg(mCurrentMsg) != 0 ) + { + KMessageBox::error(0, i18n("Moving the sent message \"%1\" from the " + "\"outbox\" to the \"sent-mail\" folder failed.\n" +--- kdepim/kmail/objecttreeparser.cpp 2005/12/16 16:18:58 488973 ++++ kdepim/kmail/objecttreeparser.cpp 2006/05/06 09:14:35 537923 +@@ -92,6 +92,7 @@ + #include <qbuffer.h> + #include <qpixmap.h> + #include <qpainter.h> ++#include <qregexp.h> + + // other headers + #include <memory> +@@ -277,7 +278,7 @@ + << node->typeString() << '/' << node->subTypeString() + << ')' << endl; + +- if ( !bpf->process( this, node, processResult ) ) ++ if ( bpf && !bpf->process( this, node, processResult ) ) + defaultHandling( node, processResult ); + } + node->setProcessed( true, false ); +@@ -765,30 +766,21 @@ + //static + bool ObjectTreeParser::containsExternalReferences( const QCString & str ) + { +- int httpPos = str.find( "\"http:", 0, true ); +- int httpsPos = str.find( "\"https:", 0, true ); ++ QRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:"); ++ int httpPos = str.find( httpRegExp, 0 ); + +- while ( httpPos >= 0 || httpsPos >= 0 ) { +- // pos = index of next occurrence of "http: or "https: whichever comes first +- int pos = ( httpPos < httpsPos ) +- ? ( ( httpPos >= 0 ) ? httpPos : httpsPos ) +- : ( ( httpsPos >= 0 ) ? httpsPos : httpPos ); ++ while ( httpPos >= 0 ) { + // look backwards for "href" +- if ( pos > 5 ) { +- int hrefPos = str.findRev( "href", pos - 5, true ); ++ if ( httpPos > 5 ) { ++ int hrefPos = str.findRev( "href", httpPos - 5, true ); + // if no 'href' is found or the distance between 'href' and '"http[s]:' + // is larger than 7 (7 is the distance in 'href = "http[s]:') then + // we assume that we have found an external reference +- if ( ( hrefPos == -1 ) || ( pos - hrefPos > 7 ) ) ++ if ( ( hrefPos == -1 ) || ( httpPos - hrefPos > 7 ) ) + return true; + } + // find next occurrence of "http: or "https: +- if ( pos == httpPos ) { +- httpPos = str.find( "\"http:", httpPos + 6, true ); +- } +- else { +- httpsPos = str.find( "\"https:", httpsPos + 7, true ); +- } ++ httpPos = str.find( httpRegExp, httpPos + 6 ); + } + return false; + } diff --git a/kde-base/kmail/kmail-3.5.2-r3.ebuild b/kde-base/kmail/kmail-3.5.2-r3.ebuild new file mode 100644 index 000000000000..7b389b34a4ed --- /dev/null +++ b/kde-base/kmail/kmail-3.5.2-r3.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/kmail-3.5.2-r3.ebuild,v 1.1 2006/05/12 12:15:01 caleb Exp $ + +KMNAME=kdepim +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +DESCRIPTION="KDE mail client" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" +DEPEND="$(deprange 3.5.0-r3 $MAXKDEVER kde-base/libkdenetwork) + $(deprange $PV $MAXKDEVER kde-base/libkdepim) + $(deprange $PV $MAXKDEVER kde-base/libkpimidentities) + $(deprange 3.5.1 $MAXKDEVER kde-base/mimelib) + $(deprange 3.5.0-r3 $MAXKDEVER kde-base/libksieve) + $(deprange $PV $MAXKDEVER kde-base/certmanager) + $(deprange $PV $MAXKDEVER kde-base/libkcal) + $(deprange $PV $MAXKDEVER kde-base/kontact)" +RDEPEND="${DEPEND} + crypt? ( app-crypt/pinentry ) + $(deprange $PV $MAXKDEVER kde-base/kdepim-kioslaves) + $(deprange 3.5.1 $MAXKDEVER kde-base/kmailcvt) + $(deprange-dual $PV $MAXKDEVER kde-base/kdebase-kioslaves) + $(deprange-dual $PV $MAXKDEVER kde-base/kcontrol)" # for the "looknfeel" icon, and probably others. + +KMCOPYLIB=" + libkdepim libkdepim/ + libkpimidentities libkpimidentities/ + libmimelib mimelib/ + libksieve libksieve/ + libkleopatra certmanager/lib/ + libkcal libkcal + libkpinterfaces kontact/interfaces/ + libkmime libkmime + libkpgp libkpgp" +KMEXTRACTONLY=" + libkdenetwork/ + libkdepim/ + libkpimidentities/ + libksieve/ + libkcal/ + mimelib/ + certmanager/ + korganizer/korganizeriface.h + kontact/interfaces/ + libkmime/ + libkpgp + dcopidlng" +KMCOMPILEONLY="libemailfunctions" +# the kmail plugins are installed with kmail +KMEXTRA="indexlib + plugins/kmail/ + kontact/plugins/kmail/" # We add here the kontact's plugin instead of compiling it with kontact because it needs a lot of this programs deps. + +PATCHES="${FILESDIR}/kmail-3.5.2-imap-fixes-2.diff + ${FILESDIR}/kmail-3.5.2-misc-fixes-2.diff + ${FILESDIR}/kmail-3.5-ham_spam_icons.diff" # This patch did not make it into svn, yet. + +src_unpack() { + kde-meta_src_unpack + + sed -i -e 's:lib_LTLIBRARIES:noinst_LTLIBRARIES:' \ + "${S}/indexlib/Makefile.am" +} + +src_compile() { + myconf="--enable-indexlib" + kde-meta_src_compile +} |