FilePath: Return optional bytearray from device hooks

For differentiating between "error" and "empty file".

Change-Id: I1806bb7386f5e7db28489f9f7e685648bfc20110
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2022-09-09 14:25:36 +02:00
parent f5c22a42ae
commit e7ddd8a5b7
12 changed files with 67 additions and 35 deletions

View File

@@ -534,7 +534,6 @@ std::optional<QByteArray> FilePath::fileContents(qint64 maxSize, qint64 offset)
{
if (needsDevice()) {
QTC_ASSERT(s_deviceHooks.fileContents, return {});
// TODO change hooks to return optional byte array
return s_deviceHooks.fileContents(*this, maxSize, offset);
}