summaryrefslogtreecommitdiff
path: root/library/resource.cpp
Unidiff
Diffstat (limited to 'library/resource.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/resource.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/library/resource.cpp b/library/resource.cpp
index f6b548d..a093e2f 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -153,39 +153,32 @@ QString Resource::findSound( const QString &name )
153QStringList Resource::allSounds() 153QStringList Resource::allSounds()
154{ 154{
155 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); 155 QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" );
156 QStringList entries = resourcedir.entryList(); 156 QStringList entries = resourcedir.entryList();
157 QStringList result; 157 QStringList result;
158 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) 158 for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i)
159 result.append((*i).replace(QRegExp("\\.wav"),"")); 159 result.append((*i).replace(QRegExp("\\.wav"),""));
160 return result; 160 return result;
161} 161}
162 162
163static QImage load_image(const QString &name) 163static QImage load_image(const QString &name)
164{ 164{
165 QImage img; 165 QImage img;
166 166
167#ifndef LIBQPE_NO_INLINE_IMAGES 167#ifndef LIBQPE_NO_INLINE_IMAGES
168 img = qembed_findImage(name.latin1()); 168 img = qembed_findImage(name.latin1());
169#else
170 QString f = Resource::findPixmap( "/inline/" + name );
171 if ( !f.isEmpty() )
172 {
173 img.load(f);
174 return img;
175 }
176#endif 169#endif
177 if ( img.isNull() ) 170 if ( img.isNull() )
178 { 171 {
179 // No inlined image, try file 172 // No inlined image, try file
180 QString f = Resource::findPixmap(name); 173 QString f = Resource::findPixmap(name);
181 if ( !f.isEmpty() ) 174 if ( !f.isEmpty() )
182 img.load(f); 175 img.load(f);
183 } 176 }
184 return img; 177 return img;
185} 178}
186 179
187/*! 180/*!
188 Returns the QImage called \a name. You should avoid including 181 Returns the QImage called \a name. You should avoid including
189 any filename type extension (e.g. .png, .xpm). 182 any filename type extension (e.g. .png, .xpm).
190*/ 183*/
191QImage Resource::loadImage( const QString &name) 184QImage Resource::loadImage( const QString &name)