Commit c54fe235 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

CMake: Send compact JSON output to cmake server



Change-Id: I0e02f122bdb2b1b417a70aa4933cc4246d6969c6
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent e487b3bd
...@@ -166,7 +166,7 @@ void ServerMode::sendRequest(const QString &type, const QVariantMap &extra, cons ...@@ -166,7 +166,7 @@ void ServerMode::sendRequest(const QString &type, const QVariantMap &extra, cons
QJsonDocument document; QJsonDocument document;
document.setObject(object); document.setObject(object);
const QByteArray rawData = START_MAGIC + document.toJson() + END_MAGIC; const QByteArray rawData = START_MAGIC + document.toJson(QJsonDocument::Compact) + END_MAGIC;
qCDebug(cmakeServerMode) << ">>>" << rawData; qCDebug(cmakeServerMode) << ">>>" << rawData;
m_cmakeSocket->write(rawData); m_cmakeSocket->write(rawData);
m_cmakeSocket->flush(); m_cmakeSocket->flush();
......
...@@ -142,11 +142,12 @@ void ServerModeReader::parse(bool force) ...@@ -142,11 +142,12 @@ void ServerModeReader::parse(bool force)
{ {
QTC_ASSERT(m_cmakeServer, return); QTC_ASSERT(m_cmakeServer, return);
QVariantMap extra; QVariantMap extra;
if (force) if (force) {
extra.insert("cacheArguments", QVariant(transform(m_parameters.configuration, extra.insert("cacheArguments", QVariant(transform(m_parameters.configuration,
[this](const CMakeConfigItem &i) { [this](const CMakeConfigItem &i) {
return i.toArgument(m_parameters.expander); return i.toArgument(m_parameters.expander);
}))); })));
}
m_future.reset(new QFutureInterface<void>()); m_future.reset(new QFutureInterface<void>());
m_future->setProgressRange(0, MAX_PROGRESS); m_future->setProgressRange(0, MAX_PROGRESS);
......
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