summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/resource.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/library/resource.cpp b/library/resource.cpp
index 4108883..f70658d 100644
--- a/library/resource.cpp
+++ b/library/resource.cpp
@@ -38,2 +38,4 @@ namespace {
+static bool g_notUseSet = ::getenv("OVERWRITE_ICON_SET");
+
/*!
@@ -161,10 +163,23 @@ static QImage load_image(const QString &name)
{
- QImage img = qembed_findImage(name.latin1());
- if ( img.isNull() ) {
- // No inlined image, try file
- QString f = Resource::findPixmap(name);
- if ( !f.isEmpty() )
- img.load(f);
+ if (g_notUseSet ) {
+ // try file
+ QImage img;
+ QString f = Resource::findPixmap(name);
+ if ( !f.isEmpty() )
+ img.load(f);
+ if (img.isNull() )
+ img = qembed_findImage(name.latin1() );
+ return img;
+ }
+ else{
+ QImage img = qembed_findImage(name.latin1());
+
+ if ( img.isNull() ) {
+ // No inlined image, try file
+ QString f = Resource::findPixmap(name);
+ if ( !f.isEmpty() )
+ img.load(f);
+ }
+ return img;
}
- return img;
}