author | drw <drw> | 2005-06-03 23:48:20 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-03 23:48:20 (UTC) |
commit | 0fcaa971ee658effa1dc36205df6dfbc43a6b0ad (patch) (unidiff) | |
tree | 1c491aa1cad74935d52312520b32892b303a99e3 | |
parent | 89422e1c42f39e576002e15e1a5a1d51f6053c74 (diff) | |
download | opie-0fcaa971ee658effa1dc36205df6dfbc43a6b0ad.zip opie-0fcaa971ee658effa1dc36205df6dfbc43a6b0ad.tar.gz opie-0fcaa971ee658effa1dc36205df6dfbc43a6b0ad.tar.bz2 |
Fix compile error...sorry Mickey...finally remembered to do this...
-rw-r--r-- | noncore/multimedia/opieplayer2/skin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp index b95c544..bd176e3 100644 --- a/noncore/multimedia/opieplayer2/skin.cpp +++ b/noncore/multimedia/opieplayer2/skin.cpp | |||
@@ -145,49 +145,49 @@ void Skin::addButtonToMask( int tag, const QImage &maskImage ) const | |||
145 | line[x] = tag; | 145 | line[x] = tag; |
146 | } | 146 | } |
147 | } | 147 | } |
148 | 148 | ||
149 | QImage Skin::buttonMaskImage( const QString &fileName ) const | 149 | QImage Skin::buttonMaskImage( const QString &fileName ) const |
150 | { | 150 | { |
151 | SkinData::ButtonMaskImageMap::Iterator it = d->buttonMasks.find( fileName ); | 151 | SkinData::ButtonMaskImageMap::Iterator it = d->buttonMasks.find( fileName ); |
152 | if ( it == d->buttonMasks.end() ) { | 152 | if ( it == d->buttonMasks.end() ) { |
153 | QString prefix = m_skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( m_fileNameInfix ); | 153 | QString prefix = m_skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( m_fileNameInfix ); |
154 | QString path = prefix + fileName; | 154 | QString path = prefix + fileName; |
155 | it = d->buttonMasks.insert( fileName, loadImage( path ) ); | 155 | it = d->buttonMasks.insert( fileName, loadImage( path ) ); |
156 | } | 156 | } |
157 | return *it; | 157 | return *it; |
158 | } | 158 | } |
159 | 159 | ||
160 | QString Skin::defaultSkinName() | 160 | QString Skin::defaultSkinName() |
161 | { | 161 | { |
162 | Config cfg( "OpiePlayer" ); | 162 | Config cfg( "OpiePlayer" ); |
163 | cfg.setGroup( "Options" ); | 163 | cfg.setGroup( "Options" ); |
164 | return cfg.readEntry( "Skin", "default" ); | 164 | return cfg.readEntry( "Skin", "default" ); |
165 | } | 165 | } |
166 | 166 | ||
167 | QImage Skin::loadImage( const QString &fileName ) | 167 | QImage Skin::loadImage( const QString &fileName ) |
168 | { | 168 | { |
169 | return QImage( OResource::findPixmap( fileName ) ); | 169 | return QImage( Opie::Core::OResource::findPixmap( fileName ) ); |
170 | } | 170 | } |
171 | 171 | ||
172 | SkinCache::SkinCache() | 172 | SkinCache::SkinCache() |
173 | { | 173 | { |
174 | // let's say we cache two skins (audio+video) at maximum | 174 | // let's say we cache two skins (audio+video) at maximum |
175 | m_cache.setMaxCost( 2 ); | 175 | m_cache.setMaxCost( 2 ); |
176 | // ... and one background pixmap | 176 | // ... and one background pixmap |
177 | m_backgroundPixmapCache.setMaxCost( 1 ); | 177 | m_backgroundPixmapCache.setMaxCost( 1 ); |
178 | } | 178 | } |
179 | 179 | ||
180 | SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &fileNameInfix ) | 180 | SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &fileNameInfix ) |
181 | { | 181 | { |
182 | QString key = skinPath + fileNameInfix; | 182 | QString key = skinPath + fileNameInfix; |
183 | 183 | ||
184 | SkinData *data = m_cache.take( key ); | 184 | SkinData *data = m_cache.take( key ); |
185 | if ( !data ) | 185 | if ( !data ) |
186 | data = new SkinData; | 186 | data = new SkinData; |
187 | else | 187 | else |
188 | odebug << "SkinCache: hit" << oendl; | 188 | odebug << "SkinCache: hit" << oendl; |
189 | 189 | ||
190 | QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath ); | 190 | QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath ); |
191 | if ( bgPixmap ) { | 191 | if ( bgPixmap ) { |
192 | odebug << "SkinCache: hit on bgpixmap" << oendl; | 192 | odebug << "SkinCache: hit on bgpixmap" << oendl; |
193 | data->backgroundPixmap = *bgPixmap; | 193 | data->backgroundPixmap = *bgPixmap; |