fixed compile error with qMax with int and unsigned int.
compatibility with Qt 4.