forked from qt-creator/qt-creator
QbsProjectManager: Switch to an out-of-process approach
That is, do not link to the qbscore library anymore. Instead, use the
JSON-based API.
Advantages:
- We can build Qt Creator with qbs support without qbs being present
on the build machine.
- Smaller memory footprint for Qt Creator, as the qbs build graphs
are now being managed by a separate process.
- Potential crashes in qbs will not kill the Qt Creator process.
Fixes: QTCREATORBUG-20622
Task-number: QTCREATORBUG-22904
Change-Id: If7d344b0ac65a99ff0a3a3db215d61b8d903e47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "customqbspropertiesdialog.h"
|
||||
#include "ui_customqbspropertiesdialog.h"
|
||||
|
||||
#include <qbs.h>
|
||||
#include "qbsprofilemanager.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -49,7 +49,7 @@ CustomQbsPropertiesDialog::CustomQbsPropertiesDialog(const QVariantMap &properti
|
||||
nameItem->setData(Qt::DisplayRole, it.key());
|
||||
m_ui->propertiesTable->setItem(currentRow, 0, nameItem);
|
||||
auto * const valueItem = new QTableWidgetItem;
|
||||
valueItem->setData(Qt::DisplayRole, qbs::settingsValueToRepresentation(it.value()));
|
||||
valueItem->setData(Qt::DisplayRole, toJSLiteral(it.value()));
|
||||
m_ui->propertiesTable->setItem(currentRow, 1, valueItem);
|
||||
++currentRow;
|
||||
}
|
||||
@@ -70,8 +70,7 @@ QVariantMap CustomQbsPropertiesDialog::properties() const
|
||||
const QString name = nameItem->text();
|
||||
if (name.isEmpty())
|
||||
continue;
|
||||
const QString rawString = m_ui->propertiesTable->item(row, 1)->text();
|
||||
properties.insert(name, qbs::representationToSettingsValue(rawString));
|
||||
properties.insert(name, fromJSLiteral(m_ui->propertiesTable->item(row, 1)->text()));
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user