Fix auto test and Qt4 warning on Windows.

Change-Id: If06c40df13eb9ecb5a5cf8942f2f19c7e3dafcce
Reviewed-by: Christian Stenger <christian.stenger@digia.com>