Forward port of commit 733841 from 3.5 branch:

Fix "After compact action mail list disappears", by ensuring that the 
folder is open in the two places where it may be needed.  Not such a major
issue now that maildir is the recommended format and mandatory for the
standard folders.
  
CCBUG:146967 

svn path=/trunk/KDE/kdepim/; revision=733843
wilder-work
Jonathan Marten 19 years ago
parent 19bd33d54c
commit 16102271b2
  1. 4
      compactionjob.cpp
  2. 6
      kmheaders.cpp

@ -66,7 +66,7 @@ void MboxCompactionJob::kill()
Q_ASSERT( mCancellable );
// We must close the folder if we opened it and got interrupted
if ( mFolderOpen && mSrcFolder && mSrcFolder->storage() ) {
mSrcFolder->storage()->close( "mboxcompactjob" );
mSrcFolder->storage()->close( "mboxcompact" );
}
if ( mTmpFile ) {
@ -128,7 +128,7 @@ int MboxCompactionJob::executeNow( bool silent )
return errno;
}
mOpeningFolder = true; // Ignore open-notifications while opening the folder
storage->open( "mboxcompactjob" );
storage->open( "mboxcompact" );
mOpeningFolder = false;
mFolderOpen = true;
mOffset = 0;

@ -2513,6 +2513,8 @@ int KMHeaders::currentItemIndex()
//-----------------------------------------------------------------------------
void KMHeaders::setCurrentItemByIndex(int msgIdx)
{
if ( !mFolder->isOpened() ) setFolder( mFolder );
if ((msgIdx >= 0) && (msgIdx < (int)mItems.size())) {
clearSelection();
bool unchanged = (currentItem() == mItems[msgIdx]);
@ -2521,6 +2523,7 @@ void KMHeaders::setCurrentItemByIndex(int msgIdx)
setSelectionAnchor( currentItem() );
if (unchanged)
highlightMessage( mItems[msgIdx], false);
makeHeaderVisible();
}
}
@ -3019,6 +3022,9 @@ SortCacheItem* KMHeaders::findParentBySubject(SortCacheItem *item)
bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
{
//kDebug(5006) << endl << kBacktrace();
if ( !mFolder->isOpened() ) mFolder->open( "kmheaders" );
//all cases
qint32 column, ascending, threaded, discovered_count, sorted_count, appended;
qint32 deleted_count = 0;

Loading…
Cancel
Save