qmake defaults to adding -O2 when compiling, which can cause gcov to miss that some lines were optimised out. I fixed this by adding this setting to my .pro file: `QMAKE_CXXFLAGS_RELEASE -= -O2`