MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / subSortLessThan

Method subSortLessThan

launcher/ui/instanceview/InstanceProxyModel.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool InstanceProxyModel::subSortLessThan(const QModelIndex& left, const QModelIndex& right) const
59{
60 BaseInstance* pdataLeft = static_cast<BaseInstance*>(left.internalPointer());
61 BaseInstance* pdataRight = static_cast<BaseInstance*>(right.internalPointer());
62 QString sortMode = APPLICATION->settings()->get("InstSortMode").toString();
63 if (sortMode == "LastLaunch") {
64 return pdataLeft->lastLaunch() > pdataRight->lastLaunch();
65 } else {
66 return m_naturalSort.compare(pdataLeft->name(), pdataRight->name()) < 0;
67 }
68}

Callers

nothing calls this directly

Calls 6

lastLaunchMethod · 0.80
toStringMethod · 0.45
getMethod · 0.45
settingsMethod · 0.45
compareMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected