mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix memory leak
The QPainter and the QPixmap were being created but never freed. A QPixmap and a QPainter don't need to be created by new, they can be safely created on the stack. So, create them on the stack, pass them via const-reference and use them correctly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
633dd64d2f
commit
db4ffd0b70
2 changed files with 19 additions and 19 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
void collapse();
|
||||
void expand();
|
||||
void clear();
|
||||
void addToolTip(const QString &toolTip, const QIcon &icon = QIcon(), const QPixmap *pixmap = NULL);
|
||||
void addToolTip(const QString &toolTip, const QIcon &icon = QIcon(), const QPixmap &pixmap = QPixmap());
|
||||
void refresh(const QPointF &pos);
|
||||
bool isExpanded() const;
|
||||
void persistPos();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue