fix some compiler warnings

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-06-30 03:04:57 +00:00
parent 5129e4e097
commit 6bdfc08b2a
4 changed files with 14 additions and 16 deletions

View file

@ -418,7 +418,7 @@ void QHttpPartPrivate::checkHeaderCreated() const
QList<QPair<QByteArray, QByteArray> > fields = allRawHeaders();
QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin();
for (; it != fields.constEnd(); ++it)
header += it->first + ": " + it->second + "\r\n";
header += it->first + QLatin1String(": ") + it->second + QLatin1String("\r\n");
header += "\r\n";
headerCreated = true;
}

View file

@ -1299,7 +1299,7 @@ QNetworkRequest QNetworkAccessManagerPrivate::prepareMultipart(const QNetworkReq
break;
}
// putting the boundary into quotes, recommended in RFC 2046 section 5.1.1
contentType += "; boundary=\"" + multiPart->d_func()->boundary + "\"";
contentType += QLatin1String("; boundary=\"") + multiPart->d_func()->boundary + QLatin1Char('"');
newRequest.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(contentType));
}

View file

@ -640,19 +640,19 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge,
QByteArray credentials;
credentials += "username=\"" + user.toLatin1() + "\", ";
credentials += "realm=\"" + realm.toLatin1() + "\", ";
credentials += "nonce=\"" + nonce + "\", ";
credentials += "uri=\"" + path + "\", ";
credentials += QLatin1String("username=\"") + user.toLatin1() + QLatin1String("\", ");
credentials += QLatin1String("realm=\"") + realm.toLatin1() + QLatin1String("\", ");
credentials += QLatin1String("nonce=\"") + nonce + QLatin1String("\", ");
credentials += QLatin1String("uri=\"") + path + QLatin1String("\", ");
if (!opaque.isEmpty())
credentials += "opaque=\"" + opaque + "\", ";
credentials += "response=\"" + response + '\"';
credentials += QLatin1String("opaque=\"") + opaque + QLatin1String("\", ");
credentials += QLatin1String("response=\"") + response + QLatin1Char('"');
if (!options.value("algorithm").isEmpty())
credentials += ", algorithm=" + options.value("algorithm");
credentials += QLatin1String(", algorithm=") + options.value("algorithm");
if (!options.value("qop").isEmpty()) {
credentials += ", qop=" + qop + ", ";
credentials += "nc=" + nonceCountString + ", ";
credentials += "cnonce=\"" + cnonce + '\"';
credentials += QLatin1String(", qop=") + qop + QLatin1String(", ");
credentials += QLatin1String("nc=") + nonceCountString + QLatin1String(", ");
credentials += QLatin1String("cnonce=\"") + cnonce + QLatin1Char('"');
}
return credentials;

View file

@ -512,14 +512,12 @@ void QHttpSocketEngine::slotSocketConnected()
data += v.toByteArray();
else
data += "Mozilla/5.0";
data += "\r\n"
"Host: " + peerAddress + "\r\n";
data += QLatin1String("\r\nHost: ") + peerAddress + QLatin1String("\r\n");
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(d->authenticator);
//qDebug() << "slotSocketConnected: priv=" << priv << (priv ? (int)priv->method : -1);
if (priv && priv->method != QAuthenticatorPrivate::None) {
d->credentialsSent = true;
data += "Proxy-Authorization: " + priv->calculateResponse(method, path);
data += "\r\n";
data += QLatin1String("Proxy-Authorization: ") + priv->calculateResponse(method, path) + QLatin1String("\r\n");
}
data += "\r\n";
// qDebug() << ">>>>>>>> sending request" << this;