Constify QDirSortItemComparator::operator() (used for sorting)

Change-Id: I7149ec2fdabdfcfa7d6f28b1105da154a333096f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
Giuseppe D'Angelo 2013-09-09 13:55:43 +02:00 committed by The Qt Project
parent 641538b301
commit 42223a777e

View File

@ -214,10 +214,10 @@ class QDirSortItemComparator
int qt_cmp_si_sort_flags;
public:
QDirSortItemComparator(int flags) : qt_cmp_si_sort_flags(flags) {}
bool operator()(const QDirSortItem &, const QDirSortItem &);
bool operator()(const QDirSortItem &, const QDirSortItem &) const;
};
bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortItem &n2)
bool QDirSortItemComparator::operator()(const QDirSortItem &n1, const QDirSortItem &n2) const
{
const QDirSortItem* f1 = &n1;
const QDirSortItem* f2 = &n2;