[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1408: I made things overcomplicated in r1403, so let's just do thi (trunk/src/gui/log)
Author: edmanm
Date: 2006-10-27 21:59:44 -0400 (Fri, 27 Oct 2006)
New Revision: 1408
Modified:
trunk/src/gui/log/logtreeitem.cpp
trunk/src/gui/log/logtreeitem.h
trunk/src/gui/log/logtreewidget.cpp
Log:
I made things overcomplicated in r1403, so let's just do things the easy way.
Modified: trunk/src/gui/log/logtreeitem.cpp
===================================================================
--- trunk/src/gui/log/logtreeitem.cpp 2006-10-27 17:27:08 UTC (rev 1407)
+++ trunk/src/gui/log/logtreeitem.cpp 2006-10-28 01:59:44 UTC (rev 1408)
@@ -122,10 +122,3 @@
return text(COL_MESG);
}
-/** Compare the given LogTreeItem to this object based on timestamp. */
-bool
-LogTreeItem::operator<(const QTreeWidgetItem &other) const
-{
- return (this->timestamp() < ((LogTreeItem *)&other)->timestamp());
-}
-
Modified: trunk/src/gui/log/logtreeitem.h
===================================================================
--- trunk/src/gui/log/logtreeitem.h 2006-10-27 17:27:08 UTC (rev 1407)
+++ trunk/src/gui/log/logtreeitem.h 2006-10-28 01:59:44 UTC (rev 1408)
@@ -57,8 +57,6 @@
/** Returns a printable string representation of the item's contents.*/
QString toString();
- /** Compare the given LogTreeItem to this object based on timestamp. */
- virtual bool operator<(const QTreeWidgetItem &other) const;
};
#endif
Modified: trunk/src/gui/log/logtreewidget.cpp
===================================================================
--- trunk/src/gui/log/logtreewidget.cpp 2006-10-27 17:27:08 UTC (rev 1407)
+++ trunk/src/gui/log/logtreewidget.cpp 2006-10-28 01:59:44 UTC (rev 1408)
@@ -72,9 +72,9 @@
QList<LogTreeItem *>
LogTreeWidget::qlist_sort(QList<LogTreeItem *> inlist)
{
- QMap<LogTreeItem, LogTreeItem *> outlist;
+ QMultiMap<QDateTime, LogTreeItem *> outlist;
foreach (LogTreeItem *item, inlist) {
- outlist.insert(*item, item);
+ outlist.insert(item->timestamp(), item);
}
return outlist.values();
}