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:
hjk
2021-07-09 08:30:11 +02:00
parent dba0294b33
commit 97578a4fee
9 changed files with 19 additions and 14 deletions

View File

@@ -93,7 +93,7 @@ public:
const QStringList &nameFilters,
QDir::Filters filters,
QDir::SortFlags sort) const override;
QByteArray fileContents(const Utils::FilePath &filePath, int limit) const override;
QByteArray fileContents(const Utils::FilePath &filePath, qint64 limit, qint64 offset) const override;
bool writeFileContents(const Utils::FilePath &filePath, const QByteArray &data) const override;
QDateTime lastModified(const Utils::FilePath &filePath) const override;
void runProcess(Utils::QtcProcess &process) const override;