Dax89 / QHexView

A versatile Hexadecimal widget for Qt5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

allow to view mmapped files

milianw opened this issue · comments

please use mmap via https://doc.qt.io/qt-5/qfiledevice.html#map to open files, instead of copying the data into memory

It can be implemented as backend

Hi
I agree one can add a new implementation of QHexBuffer and handle this (and other cases), but these is one issue: the QHexDocument constructor is private, which means the only way to pass a custom QHexBuffer is via one of the templated fromXXX functions in QHexDocument.

So, if one had a really special QHexBuffer backed by some custom data structure that does not fit in one of the fromXXX function, he could still create it but would not be able to pass it to the QHexDocument.

I can add a generic QHexDocument::fromBuffer() function that accepts a generic QHexBuffer* instance and it takes the ownership.

(Or just make the constructor public)