A new Document API where you could memory map the file and save the changes as 
a log on top would be nice. For lines you have to read the file but you don't 
have to hold it completely in memory. An other advantage would be that your 
document would be a binary reflection of the file. But I think this would be 
not a replacement of QDocument.

-----Original Message-----
From: Development <development-boun...@qt-project.org> On Behalf Of Lars Knoll
Sent: Wednesday, August 26, 2020 9:23 AM
To: Ville Voutilainen <ville.voutilai...@gmail.com>
Cc: Qt development mailing list <development@qt-project.org>
Subject: Re: [Development] qsizetype and classes working with QStrings or QList


> On 26 Aug 2020, at 09:07, Ville Voutilainen <ville.voutilai...@gmail.com> 
> wrote:
> 
> On Wed, 26 Aug 2020 at 09:39, Lars Knoll <lars.kn...@qt.io> wrote:
>>> QtGui:
>>> * QTextCursor
>>> * QTextDocument (find offset, character{At,Count})
>>> * QTextLayout
>>> * QValidator and subclasses (validate offset)
>> 
>> These here are questionable. Editing a text file with more than 2G 
>> characters? Sounds unlikely.
> 
> Thou Shalt Not Write Debug Log Viewers Or Hex Editors With Qt. :)

Porting that API might not be too much of a problem, I don’t think we have 
virtual methods in there taking offsets.

But QTextDocument is probably not the right data structure for a hex editor or 
a log viewer anyway (why would you store a hex in clear text instead of 
decoding on the fly???).

Cheers,
Lars

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to