forked from qt-creator/qt-creator
Utils: Allow an offset in FilePath::readContents()
Also, change the size limit to take a qint64. Contrary to e.g. Q(6)Hash::size() there is a realistic chance that 31 bits are not enough. Change-Id: Idbe6e765a5cac4336b3d64a8e0adb14966fd18a3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1064,12 +1064,12 @@ FilePaths DockerDevice::directoryEntries(const FilePath &filePath,
|
||||
return {};
|
||||
}
|
||||
|
||||
QByteArray DockerDevice::fileContents(const FilePath &filePath, int limit) const
|
||||
QByteArray DockerDevice::fileContents(const FilePath &filePath, qint64 limit, qint64 offset) const
|
||||
{
|
||||
QTC_ASSERT(handlesFile(filePath), return {});
|
||||
tryCreateLocalFileAccess();
|
||||
if (hasLocalFileAccess())
|
||||
return mapToLocalAccess(filePath).fileContents(limit);
|
||||
return mapToLocalAccess(filePath).fileContents(limit, offset);
|
||||
|
||||
QTC_CHECK(false); // FIXME: Implement
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user