Optimisation

svn path=/trunk/KDE/kdepim/kmail/; revision=1142754
wilder-work
Laurent Montel 16 years ago
parent ba607c7412
commit ff6a8bc0f6
  1. 3
      kmcomposereditor.cpp
  2. 8
      kmsystemtray.cpp

@ -225,6 +225,9 @@ void KMComposerEditor::slotFetchJob( KJob * job )
return;
Akonadi::Item::List items = fjob->items();
if ( items.isEmpty() )
return;
uint identity = 0;
if ( items.at( 0 ).isValid() && items.at( 0 ).parentCollection().isValid() ) {
QSharedPointer<FolderCollection> fd( FolderCollection::forCollection( items.at( 0 ).parentCollection() ) );

@ -264,7 +264,7 @@ void KMSystemTray::fillFoldersMenu( QMenu *menu, const QAbstractItemModel *model
continue;
Akonadi::CollectionStatistics statistics = collection.statistics();
qint64 count = qMax( 0LL, statistics.unreadCount() );
if ( count >= 0 ) {
if ( count > 0 ) {
QSharedPointer<FolderCollection> col = FolderCollection::forCollection( collection );
if ( col && col->ignoreNewMail() )
continue;
@ -388,9 +388,9 @@ void KMSystemTray::unreadMail( const QAbstractItemModel *model, const QModelInde
continue;
Akonadi::CollectionStatistics statistics = collection.statistics();
qint64 count = qMax( 0LL, statistics.unreadCount() );
const qint64 count = qMax( 0LL, statistics.unreadCount() );
if ( count >= 0 ) {
if ( count > 0 ) {
QSharedPointer<FolderCollection> col = FolderCollection::forCollection( collection );
if ( col && !col->ignoreNewMail() ) {
mCount += count;
@ -412,7 +412,7 @@ void KMSystemTray::unreadMail( const QAbstractItemModel *model, const QModelInde
setStatus( KStatusNotifierItem::Active );
}
kDebug()<<" mCount :"<<mCount;
//kDebug()<<" mCount :"<<mCount;
updateCount();
}

Loading…
Cancel
Save