const is pretty handy, since it will catch some programmer errors. Like, when you accidentally try to change a value you aren't supposed to.
The general rule is: Either don't use const at all, or use it everywhere.
QT wisely does use it, so you have to use it as well if you use QT classes.
The compiler was only warning you. You were basically calling a non-const function from a const function . Or rather, the QValueList was doing this, since the CClassA operator== was not const and the QValueList operator== is.
Bookmarks