forked from qt-creator/qt-creator
ProjectExplorer: Use local paths for Compiler and Qmake executable
... for variable expansion. They are used in the context of buildsteps, running locally on the build device. It's also pre-docker behavior were all paths were local anyway. Change-Id: I5d7cdc744678b0e7d09363fa1a3f3adc0cef4e02 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -547,9 +547,10 @@ void ToolChainKitAspect::addToMacroExpander(Kit *kit, Utils::MacroExpander *expa
|
|||||||
expander->registerVariable("Compiler:Executable", tr("Path to the compiler executable"),
|
expander->registerVariable("Compiler:Executable", tr("Path to the compiler executable"),
|
||||||
[kit] {
|
[kit] {
|
||||||
const ToolChain *tc = cxxToolChain(kit);
|
const ToolChain *tc = cxxToolChain(kit);
|
||||||
return tc ? tc->compilerCommand().toString() : QString();
|
return tc ? tc->compilerCommand().path() : QString();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// After 4.2
|
||||||
expander->registerPrefix("Compiler:Name", tr("Compiler for different languages"),
|
expander->registerPrefix("Compiler:Name", tr("Compiler for different languages"),
|
||||||
[kit](const QString &ls) {
|
[kit](const QString &ls) {
|
||||||
const ToolChain *tc = toolChain(kit, findLanguage(ls));
|
const ToolChain *tc = toolChain(kit, findLanguage(ls));
|
||||||
@@ -558,7 +559,7 @@ void ToolChainKitAspect::addToMacroExpander(Kit *kit, Utils::MacroExpander *expa
|
|||||||
expander->registerPrefix("Compiler:Executable", tr("Compiler executable for different languages"),
|
expander->registerPrefix("Compiler:Executable", tr("Compiler executable for different languages"),
|
||||||
[kit](const QString &ls) {
|
[kit](const QString &ls) {
|
||||||
const ToolChain *tc = toolChain(kit, findLanguage(ls));
|
const ToolChain *tc = toolChain(kit, findLanguage(ls));
|
||||||
return tc ? tc->compilerCommand().toString() : QString();
|
return tc ? tc->compilerCommand().path() : QString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -320,7 +320,7 @@ void QtKitAspect::addToMacroExpander(Kit *kit, MacroExpander *expander) const
|
|||||||
expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"),
|
expander->registerVariable("Qt:qmakeExecutable", tr("Path to the qmake executable"),
|
||||||
[kit]() -> QString {
|
[kit]() -> QString {
|
||||||
BaseQtVersion *version = qtVersion(kit);
|
BaseQtVersion *version = qtVersion(kit);
|
||||||
return version ? version->qmakeCommand().toString() : QString();
|
return version ? version->qmakeCommand().path() : QString();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user