ktexteditor and syntax-highlighting porting
dhaumann at kde.org
Sun Jul 29 12:13:08 BST 2018
On Sun, Jul 29, 2018 at 12:18 PM, Dr.-Ing. Christoph Cullmann
<cullmann at absint.com> wrote:
>> On Sun, Jul 29, 2018 at 9:53 AM, Dominik Haumann <dhaumann at kde.org> wrote:
>>> What we can add:
>>> 1. QHash<uint16_t, Format> Definition::formatHash() const;
>>> 2. Format Definition::format(uint16_t) const;
>>> 3. QHash<uint16_t, Format> Repository::formatHash() const;
>>> 4. Format Repository::format(uint16_t) const;
>> I see an issue with 3) because Definitions are lazy-loaded.
>> So the number of Format items may grow over time if more Definitions are loaded.
>> So I think we should not add this.
> as commented in the phabricator request: I would actually not do repository global id's at all.
> Or is that needed for embedded highlightings?
>From what you wrote, I had the impression that you WANT global IDs and
you WANT to just have one lookup function for all IDs. In fact, wasn't
that what we discussed at that time also with Volker? Globally unique
Besides that, loading ALL highlightings results in 2000 Format items.
BTW: Using a QVector and the ID as key also came to my mind earlier -
so the idea definitely makes sense, since the 2000 entries are not
More information about the KWrite-Devel