--- a/taskswitcher/client/s60/src/tstaskmonitorhistory.cpp Wed Oct 13 12:59:22 2010 +0300
+++ b/taskswitcher/client/s60/src/tstaskmonitorhistory.cpp Mon Oct 18 10:44:15 2010 +0300
@@ -16,16 +16,10 @@
*/
#include "tstaskmonitorhistory.h"
-TsTaskMonitorHistory::TsTaskMonitorHistory(const QByteArray &key,
- const QDateTime &updateTime) :
-mKey(key), mUpdateTime(updateTime)
+TsTaskMonitorHistory::TsTaskMonitorHistory(const QSharedPointer< CTsClientEntry > item, int offset) :
+mEntry(item),
+mOffset(offset)
{
-
-}
-
-void TsTaskMonitorHistory::setOffset(int offset)
-{
- mOffset = offset;
}
int TsTaskMonitorHistory::offset() const
@@ -33,19 +27,12 @@
return mOffset;
}
-bool TsTaskMonitorHistory::isEqual(const TsTaskMonitorHistory &item) const
+bool TsTaskMonitorHistory::operator == (const TsTaskMonitorHistory &item) const
{
- if (mKey == item.mKey) {
- return true;
- }
- return false;
+ return mEntry->Key() == item.mEntry->Key();
}
bool TsTaskMonitorHistory::isUpdated(const TsTaskMonitorHistory &item) const
{
- Q_ASSERT(mKey == item.mKey);
- if (mUpdateTime != item.mUpdateTime) {
- return true;
- }
- return false;
+ return mEntry->TimestampUpdate() != item.mEntry->TimestampUpdate();
}