Hi, I've got a problem using qSort, when I reimplement LessThan :

In my Vertical class:
Qt Code:
  1. QList<Plane *> Vertical::planes; //static list of Plane objects
  2.  
  3. bool lessThan( const Plane *plane1, const Plane *plane2)
  4. {
  5. Plane *me = Vertical::getPlanes().at(0);
  6. return(plane1->close(me->getPosition()) < plane2->close(me->getPosition()));
  7. }
  8.  
  9.  
  10. void Vertical::sortL(const QString &str)
  11. {
  12. QList <Plane *> list;
  13. qCopy(planes.begin()+1, planes.end(), list.begin());
  14. qSort(list.begin(), list.end(),lessThan);
  15. .......
  16. }
  17.  
  18. QList<Plane *> Vertical::getPlanes() {
  19. return planes;
  20. }
  21.  
  22.  
  23. and in the Plane class :
  24.  
  25. double Plane::close(const QPoint &p) const
  26. {
  27. return (sqrt((double)((p.x()-position.x())^2 + (p.y()-position.y())^2)));
  28. }
To copy to clipboard, switch view to plain text mode 
And the compiler says that qsort does not look as a function that takes 2 arguments, and gives me some lines number erros in qalgorithms.h
Any ideas ???