[Development] qsizetype and classes working with QStrings or QList

Marco Bubke Marco.Bubke at qt.io
Wed Aug 26 09:52:35 CEST 2020

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-bounces at qt-project.org> On Behalf Of Lars Knoll
Sent: Wednesday, August 26, 2020 9:23 AM
To: Ville Voutilainen <ville.voutilainen at gmail.com>
Cc: Qt development mailing list <development at qt-project.org>
Subject: Re: [Development] qsizetype and classes working with QStrings or QList

> On 26 Aug 2020, at 09:07, Ville Voutilainen <ville.voutilainen at gmail.com> wrote:
> On Wed, 26 Aug 2020 at 09:39, Lars Knoll <lars.knoll at 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???).


Development mailing list
Development at qt-project.org

More information about the Development mailing list