From acd2e59f6b414d8bf2236c8059a8cf7f4b54998a Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 8 Mar 2010 13:13:27 -0800 Subject: 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 --- src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v0.12