author | mickeyl <mickeyl> | 2005-02-19 18:09:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-02-19 18:09:40 (UTC) |
commit | 5909f43e922a066637127e48c2e3d99685e4871a (patch) (unidiff) | |
tree | 9d87440d0494a52cc8314148e0994039a3856314 | |
parent | 112337f13c70f1266430f154d486b6f23ec18488 (diff) | |
download | opie-5909f43e922a066637127e48c2e3d99685e4871a.zip opie-5909f43e922a066637127e48c2e3d99685e4871a.tar.gz opie-5909f43e922a066637127e48c2e3d99685e4871a.tar.bz2 |
back out an unintentionally commited change
-rw-r--r-- | library/resource.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/library/resource.cpp b/library/resource.cpp index 3b5e9ec..92d4b60 100644 --- a/library/resource.cpp +++ b/library/resource.cpp | |||
@@ -95,43 +95,32 @@ QBitmap Resource::loadBitmap( const QString &pix ) | |||
95 | 95 | ||
96 | Normally you will use loadPixmap() rather than this function. | 96 | Normally you will use loadPixmap() rather than this function. |
97 | */ | 97 | */ |
98 | QString Resource::findPixmap( const QString &pix ) | 98 | QString Resource::findPixmap( const QString &pix ) |
99 | { | 99 | { |
100 | QString picsPath = QPEApplication::qpeDir() + "pics/"; | 100 | QString picsPath = QPEApplication::qpeDir() + "pics/"; |
101 | QString f; | 101 | QString f; |
102 | 102 | ||
103 | // Common case optimizations... | 103 | // Common case optimizations... |
104 | f = picsPath + pix + ".png"; | 104 | f = picsPath + pix + ".png"; |
105 | if ( QFile( f ).exists() ) | 105 | if ( QFile( f ).exists() ) |
106 | return f; | 106 | return f; |
107 | f = picsPath + pix + ".xpm"; | 107 | f = picsPath + pix + ".xpm"; |
108 | if ( QFile( f ).exists() ) | 108 | if ( QFile( f ).exists() ) |
109 | return f; | 109 | return f; |
110 | 110 | ||
111 | #ifdef LIBQPE_NO_INLINE_IMAGES | ||
112 | QString picsPathInline = picsPath + "inline/"; | ||
113 | // Common case optimizations... | ||
114 | f = picsPathInline + pix + ".png"; | ||
115 | if ( QFile( f ).exists() ) | ||
116 | return f; | ||
117 | f = picsPathInline + pix + ".xpm"; | ||
118 | if ( QFile( f ).exists() ) | ||
119 | return f; | ||
120 | #endif | ||
121 | |||
122 | // All formats... | 111 | // All formats... |
123 | QStrList fileFormats = QImageIO::inputFormats(); | 112 | QStrList fileFormats = QImageIO::inputFormats(); |
124 | QString ff = fileFormats.first(); | 113 | QString ff = fileFormats.first(); |
125 | while ( fileFormats.current() ) { | 114 | while ( fileFormats.current() ) { |
126 | QStringList exts = MimeType("image/"+ff.lower()).extensions(); | 115 | QStringList exts = MimeType("image/"+ff.lower()).extensions(); |
127 | for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) { | 116 | for ( QStringList::ConstIterator it = exts.begin(); it!=exts.end(); ++it ) { |
128 | QString f = picsPath + pix + "." + *it; | 117 | QString f = picsPath + pix + "." + *it; |
129 | if ( QFile(f).exists() ) | 118 | if ( QFile(f).exists() ) |
130 | return f; | 119 | return f; |
131 | } | 120 | } |
132 | ff = fileFormats.next(); | 121 | ff = fileFormats.next(); |
133 | } | 122 | } |
134 | 123 | ||
135 | // Finally, no (or existing) extension... | 124 | // Finally, no (or existing) extension... |
136 | if ( QFile( picsPath + pix ).exists() ) | 125 | if ( QFile( picsPath + pix ).exists() ) |
137 | return picsPath + pix; | 126 | return picsPath + pix; |