diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2010-03-08 21:13:27 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2010-03-08 21:14:57 (GMT) |
commit | acd2e59f6b414d8bf2236c8059a8cf7f4b54998a (patch) | |
tree | 2768d3371dff1ae00fb83350fb7a221578b69377 /src/plugins | |
parent | e41737d36419e775f602544b2b0e8b9e96f75361 (diff) | |
download | Qt-acd2e59f6b414d8bf2236c8059a8cf7f4b54998a.zip Qt-acd2e59f6b414d8bf2236c8059a8cf7f4b54998a.tar.gz Qt-acd2e59f6b414d8bf2236c8059a8cf7f4b54998a.tar.bz2 |
Don't use DirectFB for non-existing pixmaps
DirectFB will print a warning for this since the file doesn't exist but
we might as well not try when we know the file doesn't exist.
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index b5ac67d..4219f6f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -174,6 +174,8 @@ bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img) bool QDirectFBPixmapData::fromFile(const QString &filename, const char *format, Qt::ImageConversionFlags flags) { + if (!QFile::exists(filename)) + return false; if (flags == Qt::AutoColor) { if (filename.startsWith(QLatin1Char(':'))) { // resource QFile file(filename); |