From 15677bdf3925624010446acb337054602d377cfa Mon Sep 17 00:00:00 2001 From: Thomas Frauendorfer Date: Thu, 17 Jul 2008 15:58:31 +0200 Subject: [PATCH] OTHER: Fixed a memleak in Skin.cpp Also fixed 2 other minor valgrind warnings --- src/Skin.cpp | 3 +++ src/mainwindow/timedisplay.cpp | 5 +++++ src/mainwindow/timedisplay.h | 2 +- src/widgets/pixmapnumberdisplay.cpp | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Skin.cpp b/src/Skin.cpp index 6c7593e..d4f3807 100644 --- a/src/Skin.cpp +++ b/src/Skin.cpp @@ -181,6 +181,9 @@ Skin::BuildEqualizer (void) } else { setSkin(":CleanAMP/"); } + if (imgex) { + delete imgex; + } } void diff --git a/src/mainwindow/timedisplay.cpp b/src/mainwindow/timedisplay.cpp index 3d8a778..f4fcbfa 100644 --- a/src/mainwindow/timedisplay.cpp +++ b/src/mainwindow/timedisplay.cpp @@ -41,6 +41,11 @@ SmallTimeDisplay::SmallTimeDisplay (QWidget *parent) m_d4_x_pos = 23; } +AbstractTimeDisplay::AbstractTimeDisplay (QWidget *parent) : QWidget (parent) +{ + m_time = 0; +} + /* * This method takes the playtime in seconds */ diff --git a/src/mainwindow/timedisplay.h b/src/mainwindow/timedisplay.h index b8f9ad3..7940ec5 100644 --- a/src/mainwindow/timedisplay.h +++ b/src/mainwindow/timedisplay.h @@ -30,7 +30,7 @@ class AbstractTimeDisplay : public QWidget { Q_OBJECT public: - AbstractTimeDisplay (QWidget *parent) : QWidget (parent) {}; + AbstractTimeDisplay (QWidget *parent); ~AbstractTimeDisplay () {}; void setTime (int); diff --git a/src/widgets/pixmapnumberdisplay.cpp b/src/widgets/pixmapnumberdisplay.cpp index f6e8187..dc56c38 100644 --- a/src/widgets/pixmapnumberdisplay.cpp +++ b/src/widgets/pixmapnumberdisplay.cpp @@ -21,6 +21,8 @@ PixmapNumberDisplay::PixmapNumberDisplay (QWidget *parent) : QWidget (parent) { + m_value = 0; + m_digits = 2; } void