Construct QString more efficiently

This commit is contained in:
Chocobo1
2020-03-22 18:35:16 +08:00
parent 2c23840947
commit 7de8a4d6e0
25 changed files with 60 additions and 61 deletions

View File

@@ -54,7 +54,7 @@ QByteArray Http::toByteArray(Response response)
// Header Fields
for (auto i = response.headers.constBegin(); i != response.headers.constEnd(); ++i)
buf += QString("%1: %2").arg(i.key(), i.value()).toLatin1().append(CRLF);
buf += QString::fromLatin1("%1: %2").arg(i.key(), i.value()).toLatin1().append(CRLF);
// the first empty line
buf += CRLF;