summaryrefslogtreecommitdiffstats
path: root/kmail/messageproperty.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /kmail/messageproperty.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/messageproperty.cpp')
-rw-r--r--kmail/messageproperty.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/kmail/messageproperty.cpp b/kmail/messageproperty.cpp
index 7de13eb35..b1e02161b 100644
--- a/kmail/messageproperty.cpp
+++ b/kmail/messageproperty.cpp
@@ -1,5 +1,5 @@
/* Message Property
-
+
This file is part of KMail, the KDE mail client.
Copyright (c) Don Sanders <sanders@kde.org>
@@ -66,14 +66,13 @@ void MessageProperty::setFiltering( const KMMsgBase *msgBase, bool filter )
KMFolder* MessageProperty::filterFolder( Q_UINT32 serNum )
{
- if (sFolders.contains(serNum))
- return sFolders[serNum].operator->();
- return 0;
+ TQMap<Q_UINT32, TQGuardedPtr<KMFolder> >::const_iterator it = sFolders.find( serNum );
+ return it == sFolders.constEnd() ? 0 : (*it).operator->();
}
void MessageProperty::setFilterFolder( Q_UINT32 serNum, KMFolder* folder )
{
- sFolders.replace(serNum, TQGuardedPtr<KMFolder>(folder) );
+ sFolders.insert(serNum, TQGuardedPtr<KMFolder>(folder) );
}
KMFolder* MessageProperty::filterFolder( const KMMsgBase *msgBase )
@@ -88,15 +87,14 @@ void MessageProperty::setFilterFolder( const KMMsgBase *msgBase, KMFolder* folde
ActionScheduler* MessageProperty::filterHandler( Q_UINT32 serNum )
{
- if ( sHandlers.contains( serNum ))
- return sHandlers[serNum].operator->();
- return 0;
+ TQMap<Q_UINT32, TQGuardedPtr<ActionScheduler> >::const_iterator it = sHandlers.find( serNum );
+ return it == sHandlers.constEnd() ? 0 : (*it).operator->();
}
void MessageProperty::setFilterHandler( Q_UINT32 serNum, ActionScheduler* handler )
{
if (handler)
- sHandlers.replace( serNum, TQGuardedPtr<ActionScheduler>(handler) );
+ sHandlers.insert( serNum, TQGuardedPtr<ActionScheduler>(handler) );
else
sHandlers.remove( serNum );
}
@@ -113,16 +111,16 @@ void MessageProperty::setFilterHandler( const KMMsgBase *msgBase, ActionSchedule
bool MessageProperty::transferInProgress( Q_UINT32 serNum )
{
- if (sTransfers.contains(serNum))
- return sTransfers[serNum];
- return false;
+ TQMap<Q_UINT32, int >::const_iterator it = sTransfers.find( serNum );
+ return it == sTransfers.constEnd() ? false : *it;
}
void MessageProperty::setTransferInProgress( Q_UINT32 serNum, bool transfer, bool force )
{
int transferInProgress = 0;
- if (sTransfers.contains(serNum))
- transferInProgress = sTransfers[serNum];
+ TQMap<Q_UINT32, int >::const_iterator it = sTransfers.find( serNum );
+ if (it != sTransfers.constEnd())
+ transferInProgress = *it;
if ( force && !transfer )
transferInProgress = 0;
else
@@ -130,7 +128,7 @@ void MessageProperty::setTransferInProgress( Q_UINT32 serNum, bool transfer, boo
if ( transferInProgress < 0 )
transferInProgress = 0;
if (transferInProgress)
- sTransfers.replace( serNum, transferInProgress );
+ sTransfers.insert( serNum, transferInProgress );
else
sTransfers.remove( serNum );
}
@@ -147,15 +145,14 @@ void MessageProperty::setTransferInProgress( const KMMsgBase *msgBase, bool tran
Q_UINT32 MessageProperty::serialCache( const KMMsgBase *msgBase )
{
- if (sSerialCache.contains( msgBase ))
- return sSerialCache[msgBase];
- return 0;
+ TQMap<const KMMsgBase*, long >::const_iterator it = sSerialCache.find( msgBase );
+ return it == sSerialCache.constEnd() ? 0 : *it;
}
void MessageProperty::setSerialCache( const KMMsgBase *msgBase, Q_UINT32 serNum )
{
if (serNum)
- sSerialCache.replace( msgBase, serNum );
+ sSerialCache.insert( msgBase, serNum );
else
sSerialCache.remove( msgBase );
}