Don't connect more than once.

This fixes slow message selection after checking mail in a folder which does not
use threading.


svn path=/trunk/KDE/kdepim/; revision=797305
wilder-work
Thomas McGuire 18 years ago
parent a74fb334b1
commit ede1074356
  1. 8
      kmheaders.cpp

@ -903,7 +903,7 @@ void KMHeaders::msgAdded(int id)
/* Create a new SortCacheItem to be used for threading. */
SortCacheItem *sci = new SortCacheItem;
sci->setId(id);
if (isThreaded()) {
if ( isThreaded() ) {
// make sure the id and subject dicts grow, if necessary
if (mSortCacheItems.count() == (uint)mFolder->count()
|| mSortCacheItems.count() == 0) {
@ -1065,8 +1065,10 @@ void KMHeaders::msgAdded(int id)
}
/* restore signal */
connect( this, SIGNAL(currentChanged(Q3ListViewItem*)),
this, SLOT(highlightMessage(Q3ListViewItem*)));
if ( isThreaded() ) {
connect( this, SIGNAL( currentChanged(Q3ListViewItem*) ),
this, SLOT( highlightMessage(Q3ListViewItem*) ) );
}
emit msgAddedToListView( hi );
END_TIMER(msgAdded);

Loading…
Cancel
Save