summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/resource.cpp39
1 files changed, 12 insertions, 27 deletions
diff --git a/library/resource.cpp b/library/resource.cpp
index 92d4b60..f6b548d 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -36,6 +36,4 @@ namespace {
36#endif 36#endif
37 37
38static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET");
39
40/*! 38/*!
41 \class Resource resource.h 39 \class Resource resource.h
@@ -167,35 +165,22 @@ static QImage load_image(const QString &name)
167 QImage img; 165 QImage img;
168 166
169 if (g_notUseSet ) {
170 // try file
171 QString f = Resource::findPixmap(name);
172 if ( !f.isEmpty() )
173 img.load(f);
174#ifndef LIBQPE_NO_INLINE_IMAGES 167#ifndef LIBQPE_NO_INLINE_IMAGES
175 if (img.isNull() ) 168 img = qembed_findImage(name.latin1());
176 img = qembed_findImage(name.latin1() ); 169#else
177#endif 170 QString f = Resource::findPixmap( "/inline/" + name );
171 if ( !f.isEmpty() )
172 {
173 img.load(f);
178 return img; 174 return img;
179 } 175 }
180 else{ 176#endif
181#ifndef LIBQPE_NO_INLINE_IMAGES 177 if ( img.isNull() )
182 img = qembed_findImage(name.latin1()); 178 {
183#else 179 // No inlined image, try file
184 QString f = Resource::findPixmap( "/inline/" + name ); 180 QString f = Resource::findPixmap(name);
185 if ( !f.isEmpty() ) 181 if ( !f.isEmpty() )
186 {
187 img.load(f); 182 img.load(f);
188 return img;
189 }
190#endif
191 if ( img.isNull() )
192 {
193 // No inlined image, try file
194 QString f = Resource::findPixmap(name);
195 if ( !f.isEmpty() )
196 img.load(f);
197 }
198 return img;
199 } 183 }
184 return img;
200} 185}
201 186