Quote Originally Posted by anwar.qt View Post
Hello Guys,

We are developing a Qt desktop application. We are using QtTestlib to for unit testing of the application.
So we want to calculate the code coverage for the unit tests written.

Configuration is as follows -

1. Operating system - Windows 7
2. Qt Version - 4.8
3. Compiler - MSVC 2008


Which are the tools I can use for code coverage analysis?

Hi,
I too have the same scenario where I need to display the code coverage or even if it generate any file with coverage data then also it is fine. I tried with below options in my pro file but it did not generate any file having code coverage.

QMAKE_CXXFLAGS+= -MP -fprofile-arcs -ftest-coverage -O0
QMAKE_LFLAGS += /MANIFESTUAC:NO

Can you please share the approach , like how did you resolve your issue.

In my case :
Configuration is as follows -

1. Operating system - Windows 7
2. Qt Version - 4.8
3. Compiler - Visual Studio 2010 Compiler (c1)

Note: I am writing my own pro file and after importing it to visual studio I am building it. (FYI)

Thanks in advance