[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1617: Qt >= 4.2 handles the sorting in addTopLevelItem(). We still (in trunk: . src/gui/network)
Author: edmanm
Date: 2007-01-27 22:32:10 -0500 (Sat, 27 Jan 2007)
New Revision: 1617
Modified:
trunk/
trunk/src/gui/network/routerlistwidget.cpp
Log:
r1634@adrastea: edmanm | 2007-01-27 22:07:31 -0500
Qt >= 4.2 handles the sorting in addTopLevelItem(). We still need to do the
sorted inserts ourselves in older Qts.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r1634] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/gui/network/routerlistwidget.cpp
===================================================================
--- trunk/src/gui/network/routerlistwidget.cpp 2007-01-28 01:32:21 UTC (rev 1616)
+++ trunk/src/gui/network/routerlistwidget.cpp 2007-01-28 03:32:10 UTC (rev 1617)
@@ -100,6 +100,9 @@
void
RouterListWidget::insertSorted(RouterListItem *item)
{
+ /* Qt >= 4.2 handles the sorting in addTopLevelItem(). We need to do the
+ * sorted inserts ourselves in older Qts. */
+#if QT_VERSION < 0x040200
Qt::SortOrder order = header()->sortIndicatorOrder();
int left = 0;
int right = topLevelItemCount();
@@ -127,6 +130,9 @@
} else {
insertTopLevelItem(left, item);
}
+#else
+ addTopLevelItem(item);
+#endif
}
/** Called when the user selects a router from the list. This will search the