forked from qt-creator/qt-creator
Utils: Add a FilePath::environment
A hook into the system environment of the FilePath's device. Change-Id: I274032f9e716f3cd8b2e4af2eca010b9805a4568 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1387,6 +1387,16 @@ FilePath FilePath::onDeviceSearchInPath() const
|
||||
return Environment::systemEnvironment().searchInPath(path());
|
||||
}
|
||||
|
||||
Environment FilePath::deviceEnvironment() const
|
||||
{
|
||||
if (needsDevice()) {
|
||||
QTC_ASSERT(s_deviceHooks.environment, return {});
|
||||
return s_deviceHooks.environment(*this);
|
||||
}
|
||||
return Environment::systemEnvironment();
|
||||
}
|
||||
|
||||
|
||||
FilePath FilePath::pathAppended(const QString &path) const
|
||||
{
|
||||
FilePath fn = *this;
|
||||
|
||||
Reference in New Issue
Block a user