MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / __lt__

Method __lt__

src/bitmessageqt/foldertree.py:245–256  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

243
244 # label (or address) alphabetically, disabled at the end
245 def __lt__(self, other):
246 if (isinstance(other, Ui_AddressWidget)):
247 reverse = False
248 if self.treeWidget().header().sortIndicatorOrder() == QtCore.Qt.DescendingOrder:
249 reverse = True
250 if self._getSortRank() == other._getSortRank():
251 x = self._getLabel().lower()
252 y = other._getLabel().lower()
253 return x < y
254 return (not reverse if self._getSortRank() < other._getSortRank() else reverse)
255
256 return super(QtGui.QTreeWidgetItem, self).__lt__(other)
257
258
259class Ui_SubscriptionWidget(Ui_AddressWidget, AccountMixin):

Callers

nothing calls this directly

Calls 3

_getSortRankMethod · 0.95
_getLabelMethod · 0.95
__lt__Method · 0.45

Tested by

no test coverage detected