-rw-r--r-- | library/resource.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/resource.cpp b/library/resource.cpp index 6f164c7..80ce7a2 100644 --- a/library/resource.cpp +++ b/library/resource.cpp @@ -81,49 +81,50 @@ QBitmap Resource::loadBitmap( const QString &pix ) bm = loadPixmap(pix); return bm; } /*! Returns the filename of a pixmap called \a pix. You should avoid including any filename type extension (e.g. .png, .xpm). Normally you will use loadPixmap() rather than this function. */ QString Resource::findPixmap( const QString &pix ) { QString picsPath = QPEApplication::qpeDir() + "pics/"; QString f; // Common case optimizations... f = picsPath + pix + ".png"; if ( QFile( f ).exists() ) return f; f = picsPath + pix + ".xpm"; if ( QFile( f ).exists() ) return f; - qDebug ( "\nLoading of image '%s' is not ideal (either it doesn't exist or an extension was specified)\n", pix.latin1()); + //qDebug ( "\nLoading of image '%s' is not ideal (either it doesn't exist or an extension was specified)\n", pix.latin1()); +//is this really necessary?? // All formats... QStrList fileFormats = QImageIO::inputFormats(); QString ff = fileFormats.first(); while ( fileFormats.current() ) { QStringList exts = MimeType("image/"+ff.lower()).extensions(); for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) { QString f = picsPath + pix + "." + *it; if ( QFile(f).exists() ) return f; } ff = fileFormats.next(); } // Finally, no (or existing) extension... if ( QFile( picsPath + pix ).exists() ) return picsPath + pix; //qDebug("Cannot find pixmap: %s", pix.latin1()); return QString(); } /*! Returns a sound file for a sound called \a name. |