Fix compilation with MSVC 2010

Issue #10158: https://github.com/ariya/phantomjs/issues/10158
This bug introduced by the marco max( ) defined in <windef.h>.
It replaces max( ) with another statement but still preceeded by numberic_limits<Type>::
The workaround is to use the parenthesis
1.x
Vitaliy Slobodin 2013-04-13 14:21:22 +04:00 committed by Ariya Hidayat
parent 78242e5d6c
commit 3edcabef9f
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkR
// http://code.google.com/p/phantomjs/issues/detail?id=337
if (op == QNetworkAccessManager::PostOperation) {
if (outgoingData) postData = outgoingData->peek(std::numeric_limits < qint64 >::max());
if (outgoingData) postData = outgoingData->peek((std::numeric_limits<qint64>::max)());
QString contentType = req.header(QNetworkRequest::ContentTypeHeader).toString();
if (contentType.isEmpty()) {
req.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");