Quote Originally Posted by wysota View Post
This should work:
Qt Code:
  1. bool operator==(const TestItem *one, const TestItem *two) const {
  2. return one->value() == two->value();
  3. }
To copy to clipboard, switch view to plain text mode 
But this is risky, because you might have trouble checking for null values.
This one is probably safer, though a little slower...
Qt Code:
  1. bool operator==(const TestItem *one, const TestItem *two) const {
  2. return (one && two) ? (one->value() == two->value()) : false;
  3. }
To copy to clipboard, switch view to plain text mode