Fixed the QThread tests for Windows.
Fixed the QThread tests for Windows.

Backported d04d67e146bce3d407f992c283d7ab3d0c25d428 and
08b54f274d57e4735d0042e295237f176506433d from 4.6.

igor-sfdc/qt-wk,igor-sfdc/qt-wk,KDE/qt,KDE/qt,radekp/qt,pruiz/wkhtmltopdf-qt,pruiz/wkhtmltopdf-qt,RLovelett/qt,RLovelett/qt,KDE/qt,KDE/qt,RLovelett/qt,pruiz/wkhtmltopdf-qt,radekp/qt,radekp/qt,igor-sfdc/qt-wk,radekp/qt,pruiz/wkhtmltopdf-qt,igor-sfdc/qt-wk,KDE/qt,RLovelett/qt,RLovelett/qt,pruiz/wkhtmltopdf-qt,KDE/qt,pruiz/wkhtmltopdf-qt,RLovelett/qt,KDE/qt,pruiz/wkhtmltopdf-qt,radekp/qt,igor-sfdc/qt-wk,igor-sfdc/qt-wk,radekp/qt,RLovelett/qt,radekp/qt,RLovelett/qt,radekp/qt,radekp/qt,KDE/qt,RLovelett/qt,RLovelett/qt,RLovelett/qt,pruiz/wkhtmltopdf-qt,igor-sfdc/qt-wk,pruiz/wkhtmltopdf-qt,pruiz/wkhtmltopdf-qt,pruiz/wkhtmltopdf-qt,igor-sfdc/qt-wk,igor-sfdc/qt-wk,igor-sfdc/qt-wk,radekp/qt,igor-sfdc/qt-wk