-rw-r--r-- | library/resource.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/library/resource.cpp b/library/resource.cpp index 92d4b60..f6b548d 100644 --- a/library/resource.cpp +++ b/library/resource.cpp @@ -26,26 +26,24 @@ #include <qpixmapcache.h> // this namespace is just a workaround for a gcc bug // gcc exports inline functions in the generated file // inlinepics_p.h #ifndef LIBQPE_NO_INLINE_IMAGES namespace { #include "inlinepics_p.h" } #endif -static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET"); - /*! \class Resource resource.h \brief The Resource class provides access to named resources. The resources may be provided from files or other sources. The allSounds() function returns a list of all the sounds available. A particular sound can be searched for using findSound(). Images can be loaded with loadImage(), loadPixmap(), loadBitmap() and loadIconSet(). @@ -157,56 +155,43 @@ QStringList Resource::allSounds() QDir resourcedir( QPEApplication::qpeDir() + "sounds/", "*.wav" ); QStringList entries = resourcedir.entryList(); QStringList result; for (QStringList::Iterator i=entries.begin(); i != entries.end(); ++i) result.append((*i).replace(QRegExp("\\.wav"),"")); return result; } static QImage load_image(const QString &name) { QImage img; - if (g_notUseSet ) { - // try file - QString f = Resource::findPixmap(name); - if ( !f.isEmpty() ) - img.load(f); -#ifndef LIBQPE_NO_INLINE_IMAGES - if (img.isNull() ) - img = qembed_findImage(name.latin1() ); -#endif - return img; - } - else{ #ifndef LIBQPE_NO_INLINE_IMAGES img = qembed_findImage(name.latin1()); #else QString f = Resource::findPixmap( "/inline/" + name ); if ( !f.isEmpty() ) { img.load(f); return img; } #endif if ( img.isNull() ) { // No inlined image, try file QString f = Resource::findPixmap(name); if ( !f.isEmpty() ) img.load(f); } return img; } -} /*! Returns the QImage called \a name. You should avoid including any filename type extension (e.g. .png, .xpm). */ QImage Resource::loadImage( const QString &name) { #ifndef QT_NO_DEPTH_32 // have alpha-blended pixmaps static QImage last_enabled; static QString last_enabled_name; if ( name == last_enabled_name ) return last_enabled; |