summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-02 10:49:13 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-02 10:49:13 -0600
commit5a2639a63ab0acbc757c47c21bad7aaec7c0f481 (patch)
treef088c8310dce17a98dec616feaa1344707085037
parent6d74bae8a11865d0d3d373781de6cc95682f5cc4 (diff)
downloadtdelibs-5a2639a63ab0acbc757c47c21bad7aaec7c0f481.tar.gz
tdelibs-5a2639a63ab0acbc757c47c21bad7aaec7c0f481.zip
Fix minicli icon preview
-rw-r--r--kio/kio/kurifilter.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp
index 42840a588..afcfd74b3 100644
--- a/kio/kio/kurifilter.cpp
+++ b/kio/kio/kurifilter.cpp
@@ -188,6 +188,8 @@ TQString KURIFilterData::iconName()
m_strIconName = exeName;
else {
// not found, try to load from elf file (if supported)
+ // otherwise use default
+ m_strIconName = TQString::fromLatin1("exec");
#ifdef HAVE_ELFICON
// Check for an embedded icon
unsigned int icon_size;
@@ -244,27 +246,26 @@ TQString KURIFilterData::iconName()
}
}
- if ((iconresnamefound == 0) && (icon)) {
- // Extract the embedded icon
- size_t icon_data_length;
- char* icondata = libr_icon_malloc(icon, &icon_data_length);
- m_customIconPixmap.loadFromData(static_cast<uchar*>(static_cast<void*>(icondata)), icon_data_length); // EVIL CAST
- if (icon_size != 0) {
- TQImage ip = m_customIconPixmap.convertToImage();
- ip = ip.smoothScale(icon_size, icon_size);
- m_customIconPixmap.convertFromImage(ip);
+ if (libr_can_continue == 1) {
+ if ((iconresnamefound == 0) && (icon)) {
+ // Extract the embedded icon
+ size_t icon_data_length;
+ char* icondata = libr_icon_malloc(icon, &icon_data_length);
+ m_customIconPixmap.loadFromData(static_cast<uchar*>(static_cast<void*>(icondata)), icon_data_length); // EVIL CAST
+ if (icon_size != 0) {
+ TQImage ip = m_customIconPixmap.convertToImage();
+ ip = ip.smoothScale(icon_size, icon_size);
+ m_customIconPixmap.convertFromImage(ip);
+ }
+ free(icondata);
+ libr_icon_close(icon);
}
- free(icondata);
- libr_icon_close(icon);
- }
- libr_close(handle);
+ libr_close(handle);
+ }
}
}
#endif // HAVE_ELFICON
-
- // not found, use default
- m_strIconName = TQString::fromLatin1("exec");
}
break;
}