Fixed memory leak in the KateTabButton class.
Review Request #119185 - Created July 8, 2014 and submitted
|Miquel Sabaté Solà|
Valgrind told me that there was a memory leak here. In QPropertyAnimation we have two available constructors:QPropertyAnimation(QObject *parent = 0); QPropertyAnimation(QObject *target, const QByteArray &propertyName, QObject *parent = 0);
Since we're using the second version, the QObject parent is the last parameter, not the first one. Therefore, we set the parent to NULL and the QPropertyAnimation thingie didn't get deallocated properly. With this patch we're passing "this" to the parent. I think that this is the proper value, and things don't seem to break with this patch :)
I've messed a bit with it and it doesn't seem to have any regressions.