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:
@@ -50,7 +50,7 @@ static Abis detectTargetAbis(const FilePath &sdpPath)
|
||||
FilePath qnxTarget;
|
||||
|
||||
if (!sdpPath.fileName().isEmpty()) {
|
||||
QList<Utils::EnvironmentItem> environment = QnxUtils::qnxEnvironment(sdpPath.toString());
|
||||
Utils::EnvironmentItems environment = QnxUtils::qnxEnvironment(sdpPath.toString());
|
||||
foreach (const Utils::EnvironmentItem &item, environment) {
|
||||
if (item.name == QLatin1Literal("QNX_TARGET"))
|
||||
qnxTarget = FilePath::fromString(item.value);
|
||||
@@ -72,12 +72,11 @@ static Abis detectTargetAbis(const FilePath &sdpPath)
|
||||
return result;
|
||||
}
|
||||
|
||||
static void setQnxEnvironment(Environment &env, const QList<EnvironmentItem> &qnxEnv)
|
||||
static void setQnxEnvironment(Environment &env, const EnvironmentItems &qnxEnv)
|
||||
{
|
||||
// We only need to set QNX_HOST and QNX_TARGET needed when running qcc
|
||||
foreach (const EnvironmentItem &item, qnxEnv) {
|
||||
if (item.name == QLatin1String("QNX_HOST") ||
|
||||
item.name == QLatin1String("QNX_TARGET") )
|
||||
if (item.name == QLatin1String("QNX_HOST") || item.name == QLatin1String("QNX_TARGET"))
|
||||
env.set(item.name, item.value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user