Add missing QT_VERSION guards
Make sure QElapsedTimers are invalidated before use