summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-base/kmail')
-rw-r--r--kde-base/kmail/ChangeLog8
-rw-r--r--kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff66
-rw-r--r--kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff434
-rw-r--r--kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff329
-rw-r--r--kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff273
5 files changed, 7 insertions, 1103 deletions
diff --git a/kde-base/kmail/ChangeLog b/kde-base/kmail/ChangeLog
index 93020db73f2d..ff8aada097c5 100644
--- a/kde-base/kmail/ChangeLog
+++ b/kde-base/kmail/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for kde-base/kmail
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.98 2007/02/04 02:35:32 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.99 2007/02/05 11:54:33 flameeyes Exp $
+
+ 05 Feb 2007; Diego Pettenò <flameeyes@gentoo.org>
+ -files/kmail-3.5.2-imap-fixes-2.diff, -files/kmail-3.5.2-misc-fixes.diff,
+ -files/kmail-3.5.2-misc-fixes-2.diff,
+ -files/kmail-3.5-ham_spam_icons.diff:
+ Remove unneeded patches.
04 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> -kmail-3.5.2-r4.ebuild,
-kmail-3.5.6.ebuild:
diff --git a/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff b/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff
deleted file mode 100644
index c85eb013a795..000000000000
--- a/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -urN kdepim-3.5.0.old/kmail/kmail-3.5-filter-icons.pl kdepim-3.5.0/kmail/kmail-3.5-filter-icons.pl
---- kdepim-3.5.0.old/kmail/kmail-3.5-filter-icons.pl 1970-01-01 01:00:00.000000000 +0100
-+++ kdepim-3.5.0/kmail/kmail-3.5-filter-icons.pl 2005-12-19 21:47:43.000000000 +0100
-@@ -0,0 +1,22 @@
-+#!/usr/bin/perl -w
-+
-+use strict;
-+
-+# This script updates some configuration keys
-+
-+# read the whole config file
-+my $currentGroup = "";
-+my %configFile;
-+while ( <> ) {
-+ chomp; # eat the trailing '\n'
-+ next if ( /^$/ ); # skip empty lines
-+ next if ( /^\#/ ); # skip comments
-+ if ( /^\[/ ) { # group begin
-+ $currentGroup = $_;
-+ next;
-+ } elsif ( $currentGroup =~ /^\[Filter #[0-9]+\]$/ && /^Icon=/ ) {
-+ my ($key,$value) = split /=/;
-+ print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_spam\n" if $value eq "mark_as_spam";
-+ print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_ham\n" if $value eq "mark_as_ham";
-+ }
-+}
-diff -urN kdepim-3.5.0.old/kmail/kmail.upd kdepim-3.5.0/kmail/kmail.upd
---- kdepim-3.5.0.old/kmail/kmail.upd 2005-09-10 10:24:01.000000000 +0200
-+++ kdepim-3.5.0/kmail/kmail.upd 2005-12-19 21:31:18.000000000 +0100
-@@ -158,6 +158,10 @@
- Id=3.4.1
- File=kmailrc
- Script=kmail-3.4.1-update-status-filters.pl,perl
-+# Update icon names for spam/ham filters
-+Id=3.5-filter-icons
-+File=kmailrc
-+Script=kmail-3.5-filter-icons.pl,perl
- #
- # Important notice:
- # If you add updates here, keep this text below them.
-diff -urN kdepim-3.5.0.old/kmail/kmstartup.cpp kdepim-3.5.0/kmail/kmstartup.cpp
---- kdepim-3.5.0.old/kmail/kmstartup.cpp 2005-11-08 23:33:29.000000000 +0100
-+++ kdepim-3.5.0/kmail/kmstartup.cpp 2005-12-19 21:21:00.000000000 +0100
-@@ -113,7 +113,8 @@
- "3.4-misc",
- "3.4a",
- "3.4b",
-- "3.4.1"
-+ "3.4.1",
-+ "3.5-filter-icons"
- };
- static const int numUpdates = sizeof updates / sizeof *updates;
- // Warning: do not remove entries in the above array, or the update-level check below will break
-diff -urN kdepim-3.5.0.old/kmail/Makefile.am kdepim-3.5.0/kmail/Makefile.am
---- kdepim-3.5.0.old/kmail/Makefile.am 2005-12-19 21:04:14.000000000 +0100
-+++ kdepim-3.5.0/kmail/Makefile.am 2005-12-19 21:54:08.000000000 +0100
-@@ -175,7 +175,8 @@
- kmail-3.3-misc.pl \
- kmail-3.3b1-misc.pl \
- kmail-3.4-misc.pl \
-- kmail-3.4.1-update-status-filters.pl
-+ kmail-3.4.1-update-status-filters.pl \
-+ kmail-3.5-filter-icons.pl
-
- confdir = $(kde_confdir)
- conf_DATA = kmail.antispamrc kmail.antivirusrc
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
deleted file mode 100644
index f8d7326327f9..000000000000
--- a/kde-base/kmail/files/kmail-3.5.2-imap-fixes-2.diff
+++ /dev/null
@@ -1,434 +0,0 @@
---- 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
deleted file mode 100644
index f05626b998f5..000000000000
--- a/kde-base/kmail/files/kmail-3.5.2-misc-fixes-2.diff
+++ /dev/null
@@ -1,329 +0,0 @@
---- 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/files/kmail-3.5.2-misc-fixes.diff b/kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff
deleted file mode 100644
index 001a0487d338..000000000000
--- a/kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff
+++ /dev/null
@@ -1,273 +0,0 @@
---- 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/configuredialog.cpp 2006/01/21 12:34:03 500799
-+++ kdepim/kmail/configuredialog.cpp 2006/04/01 23:19:36 525407
-@@ -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/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/kmsender.cpp 2006/03/20 17:51:08 520754
-+++ kdepim/kmail/kmsender.cpp 2006/04/15 13:05:11 530119
-@@ -373,8 +373,10 @@
- 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:
---- kdepim/kmail/objecttreeparser.cpp 2005/12/16 16:18:58 488973
-+++ kdepim/kmail/objecttreeparser.cpp 2006/04/02 13:18:14 525563
-@@ -92,6 +92,7 @@
- #include <qbuffer.h>
- #include <qpixmap.h>
- #include <qpainter.h>
-+#include <qregexp.h>
-
- // other headers
- #include <memory>
-@@ -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;
- }
---- 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();
- }