--- a/src/misc.h Wed Oct 16 16:05:51 2013 +0300 +++ b/src/misc.h Wed Oct 16 16:40:42 2013 +0300 @@ -161,4 +161,10 @@ { return isZero (a - (int) a); } +template<class T> void removeDuplicates (QList<T>& a) +{ std::sort (a.begin(), a.end()); + typename QList<T>::iterator pos = std::unique (a.begin(), a.end()); + a.erase (pos, a.end()); +} + #endif // MISC_H