Diffstat (limited to 'noncore/multimedia/opieplayer2/skin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index a8f4ae9..44f5ca2 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp | |||
@@ -74,17 +74,21 @@ Skin::Skin( const QString &fileNameInfix ) | |||
74 | { | 74 | { |
75 | init( defaultSkinName() ); | 75 | init( defaultSkinName() ); |
76 | } | 76 | } |
77 | 77 | ||
78 | Skin::~Skin() | 78 | Skin::~Skin() |
79 | { | 79 | { |
80 | SkinCache::self().store( m_skinPath, m_fileNameInfix, d ); | 80 | if ( m_isCachable ) |
81 | SkinCache::self().store( m_skinPath, m_fileNameInfix, d ); | ||
82 | else | ||
83 | delete d; | ||
81 | } | 84 | } |
82 | 85 | ||
83 | void Skin::init( const QString &name ) | 86 | void Skin::init( const QString &name ) |
84 | { | 87 | { |
88 | m_isCachable = true; | ||
85 | m_skinPath = "opieplayer2/skins/" + name; | 89 | m_skinPath = "opieplayer2/skins/" + name; |
86 | d = SkinCache::self().lookupAndTake( m_skinPath, m_fileNameInfix ); | 90 | d = SkinCache::self().lookupAndTake( m_skinPath, m_fileNameInfix ); |
87 | } | 91 | } |
88 | 92 | ||
89 | QPixmap Skin::backgroundPixmap() const | 93 | QPixmap Skin::backgroundPixmap() const |
90 | { | 94 | { |