[Interest] Smaller QString Serialization

2025-04-14 Thread Josh
Hello all, It looks like the standard QString serialization writes a 32-bit size (uses 0x for Null String, and uses 0xFFFE if 32-bit isn't big enough and then writes a 64-bit size), followed by 16 bits for each character. To save space, I want to use a scheme that writes an 8-bit

Re: [Interest] QML: Considerations on an interesting design pattern that relies on JS engine's garbage collection

2025-04-14 Thread Fatih Uzunoğlu
> Furthermore, anything that has an ID is discoverable in derived scopes > and contexts. Therefore, nothing that has an ID can be deferred. At > least not in the current setup. Thus, your example would still not work > if all properties of type Component were deferred by default. Yeah, I have pro

Re: [Interest] How to make QMap work as input to std::ranges::views?

2025-04-14 Thread Giuseppe D'Angelo via Interest
Il 14/04/25 17:35, Volker Hilsheimer via Interest ha scritto: As Thiago says, you have to use std::views::transform. In that case, you can put the QMap itself directly into the pipeline: auto viewAsPair = map | std::views::transform(fTransform); But you cannot use an rvalue as the input range

Re: [Interest] How to make QMap work as input to std::ranges::views?

2025-04-14 Thread Volker Hilsheimer via Interest
> On 14 Apr 2025, at 17:19, Thiago Macieira wrote: > > On Monday, 14 April 2025 07:35:50 Pacific Daylight Time Schimkowitsch Robert > wrote: >> I have tried and failed, please see https://godbolt.org/z/9zTzP7sYj >> It looks like QMap::asKeyValueRange returns something that is not really >> un

Re: [Interest] QML: Considerations on an interesting design pattern that relies on JS engine's garbage collection

2025-04-14 Thread Ulf Hermann via Interest
Is this feasible? It is not good to have exceptions for specific types, but `Component` is already a special type, so that seems fair. I'm actually trying to make it less special, not more so. Yet, following your arguments, one could actually make any element that doesn't have an ID destructib

Re: [Interest] How to make QMap work as input to std::ranges::views?

2025-04-14 Thread Thiago Macieira
On Monday, 14 April 2025 07:35:50 Pacific Daylight Time Schimkowitsch Robert wrote: > I have tried and failed, please see https://godbolt.org/z/9zTzP7sYj > It looks like QMap::asKeyValueRange returns something that is not really > understood as a range, or not one that views can use. > > How can

[Interest] How to make QMap work as input to std::ranges::views?

2025-04-14 Thread Schimkowitsch Robert
I have tried and failed, please see https://godbolt.org/z/9zTzP7sYj It looks like QMap::asKeyValueRange returns something that is not really understood as a range, or not one that views can use. How can I use a QMap as input to a std::ranges::views pipeline? Kind regards Robert