Le 21/02/2017 à 20:13, Guillaume Munch a écrit :
Thanks for doing this. I thought there was some bigger adaptation to the
code to do but indeed it only looks like a matter of C++98 conversion.

You mean it was a trap? It did not work %-p

I think it's all good except:

class Cache : private QCache<Key, Val> {
-#if !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
+#if defined(LYX_USE_CXX11) && !(defined(__GNUC__) && (__GNUC__ == 4) &&
(__GNUC_MINOR__ == 6))

Indeed. Richard, I think this patch should go in 2.2.3, because the caching code that is in stable causes bad memory leaks with Qt5.

BTW, why don't you use Cache::contains in getLayout like you do for
other cache uses?


This is explained in the documentation of Cache::object. It is enough to
check for a null pointer in that case.

It would be nice to hide these subtleties in the Cache implementation, if possible.

JMarc

Reply via email to