[Interest] invalidated copies of QString in QCommonStyle::cachedOption
Mojmír Svoboda
mojmir.svoboda at bistudio.com
Wed Jan 20 12:34:33 CET 2016
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.
> 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? :)
> 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
More information about the Interest
mailing list