forked from qt-creator/qt-creator
Utils: Add some description of FilePath::onDevice
Change-Id: I92f2a9b387b026e128b5a733211aec0d9c443d4f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1195,6 +1195,18 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a
|
|||||||
return relativePath;
|
return relativePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns a path corresponding to the current object on the
|
||||||
|
same device as \a deviceTemplate.
|
||||||
|
|
||||||
|
Example usage:
|
||||||
|
\code
|
||||||
|
localDir = FilePath::fromString("/tmp/workingdir");
|
||||||
|
executable = FilePath::fromUrl("docker://123/bin/ls")
|
||||||
|
realDir = localDir.onDevice(executable)
|
||||||
|
assert(realDir == FilePath::fromUrl("docker://123/tmp/workingdir"))
|
||||||
|
\endcode
|
||||||
|
*/
|
||||||
FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
||||||
{
|
{
|
||||||
FilePath res = *this;
|
FilePath res = *this;
|
||||||
|
|||||||
Reference in New Issue
Block a user