Пример #1
0
bool KLFLibEntrySorter::compareLessThan(const KLFLibEntry& a, const KLFLibEntry& b,
					int propId, Qt::SortOrder order) const
{
  if (pCloneOf != NULL)
    return pCloneOf->compareLessThan(a, b, propId, order);

  QString as = entryValue(a, propId);
  QString bs = entryValue(b, propId);
  if (order == Qt::AscendingOrder)
    return QString::localeAwareCompare(as, bs) < 0;
  return QString::localeAwareCompare(as, bs) > 0;
}
 // copy an entry contents into another entry
 inline void copyEntry(ItemLink target, ItemLink source)
 {
     // copy all of the information (NOTE:  we need to use setField() for this)
     setValue(target, entryValue(source));
     entries[target].next = entries[source].next;
     entries[target].previous = entries[source].next;
 }
 // perform an item comparison for a position
 inline bool isItem(ItemLink position, RexxInternalObject *item)
 {
     // default comparison is object identity
     return item->isEqual(entryValue(position));
 }