[Interest] invalidated copies of QString in QCommonStyle::cachedOption
Igor Mironchik
igor.mironchik at gmail.com
Wed Jan 20 13:09:37 CET 2016
On 20.01.2016 14:34, Mojmír Svoboda wrote:
> On 20.1.2016 11:26, Igor Mironchik wrote:
>
>> Just looked a little at your code. And that what I can say: your code
>> has nothing with QStringLiteral.
>
> QStringDataTable uses the same technique as QStringLiteral.
QStringLiteral uses static structs! You don't.
>
>> And I don't understand why you need such a "crazy" :) code? May be would
>> be much more better and effective to implement custom model and just
>> store in the model normal QStrings?
>
> Normally these strings are read-only so there is no reason to allocate
> them on a heap. And there are lots of them (may exceed order 10^6)
> Then I met the article I mentioned earlier so I went for it, because
> it seems like a neat feature... what could possibly go wrong? :)
I do not know. I need benchmarks for it. May be you will win nothing...
>
>> And you forgot to delete selection model! Seems that this cache of
>> QString exists because selection model use it?!
>
> oh yeah, i indeed forgot. will try.
>
> cheers,
> Mojmir
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list