Commit 0e62487f authored by Erik Verbruggen's avatar Erik Verbruggen Committed by Friedemann Kleint

Git: fix compilation failure in Qt4 specific code.

Caused by 76209948 where a memory pool
was introduced to fix memory leakage.

Change-Id: Ib2f7c53e9560ff473fcdfedd6dcfce50455095da
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: default avatarPrzemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 76a3007e
......@@ -664,11 +664,13 @@ static bool parseOutput(const QSharedPointer<GerritParameters> &parameters,
result.clear();
result.reserve(lines.size());
Utils::JsonMemoryPool pool;
foreach (const QByteArray &line, lines) {
if (line.isEmpty())
continue;
QScopedPointer<Utils::JsonValue> objectValue(Utils::JsonValue::create(QString::fromUtf8(line)));
if (objectValue.isNull()) {
Utils::JsonValue *objectValue = Utils::JsonValue::create(QString::fromUtf8(line), &pool);
if (!objectValue) {
QString errorMessage = GerritModel::tr("Parse error: '%1'")
.arg(QString::fromLocal8Bit(line));
qWarning() << errorMessage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment