Qt projects which use the testlib module cannot be compiled, because of the following compiler error:
This is caused by the following section inside the qtest.h
Since the QT_TESTCASE_BUILDDIR is defined by the mkspecs\features\testlib_defines.prf but the RegEx in QMake_DEFINES_ extracts only the key without the value, the above if branch is executed but the define is empty.
To avoid that I've included also the values by using DEFINES=/-D(\S+)/$1/, which extracts correctly, but the value is incompatible with MSVC.
The mentioned testlib_defines.prf contains the following content, but since apparently none of the vc templates is used, the alternative (incompatible) value is set.
As a workaround I've now excluded the define which works at the moment. DEFINES=/-D((?!QT_TESTCASE_BUILDDIR)\S+)/$1/