forked from qt-creator/qt-creator
Enable macro editing for the Clang indexer
Refactor much of the code from Environment* classes to NameValue* classes to share it with the preprocessor macro settings. Change-Id: Ica4ee817aa338230c422b30d91240d266248d226 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -630,19 +630,16 @@ void ExternalToolConfig::updateEffectiveArguments()
|
||||
|
||||
void ExternalToolConfig::editEnvironmentChanges()
|
||||
{
|
||||
bool ok;
|
||||
const QString placeholderText = Utils::HostOsInfo::isWindowsHost()
|
||||
? tr("PATH=C:\\dev\\bin;${PATH}")
|
||||
: tr("PATH=/opt/bin:${PATH}");
|
||||
const QList<Utils::EnvironmentItem> newItems =
|
||||
Utils::EnvironmentDialog::getEnvironmentItems(&ok, ui->environmentLabel,
|
||||
m_environment,
|
||||
placeholderText);
|
||||
if (!ok)
|
||||
return;
|
||||
|
||||
m_environment = newItems;
|
||||
updateEnvironmentLabel();
|
||||
const auto newItems = Utils::EnvironmentDialog::getEnvironmentItems(ui->environmentLabel,
|
||||
m_environment,
|
||||
placeholderText);
|
||||
if (newItems) {
|
||||
m_environment = *newItems;
|
||||
updateEnvironmentLabel();
|
||||
}
|
||||
}
|
||||
|
||||
void ExternalToolConfig::updateEnvironmentLabel()
|
||||
|
||||
Reference in New Issue
Block a user