summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-04 11:17:47 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-04 11:17:47 (GMT)
commitbe212bf108e71ba3b5b75802b1f4de6613ba315c (patch)
treec541ad12e8698f04e8fe386c2e1b94e8baca6c1b /src/gui/image/qpixmap.cpp
parent67ae1b0dac175f48875507f3187ed49276a29ddf (diff)
parente6bb00250b321b149dd80259dc4f479088d5949b (diff)
downloadQt-be212bf108e71ba3b5b75802b1f4de6613ba315c.zip
Qt-be212bf108e71ba3b5b75802b1f4de6613ba315c.tar.gz
Qt-be212bf108e71ba3b5b75802b1f4de6613ba315c.tar.bz2
Merge commit 'origin/master'
Conflicts: src/corelib/global/qglobal.h src/corelib/kernel/qmetatype.cpp src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/gui/graphicsview/qgraphicssceneevent.h src/gui/itemviews/qheaderview.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qgesture.h src/gui/kernel/qgesturerecognizer.h src/gui/painting/qpaintengine_raster.cpp src/network/access/qhttpnetworkreply.cpp src/network/access/qnetworkcookie.h src/network/socket/qnativesocketengine_unix.cpp
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r--src/gui/image/qpixmap.cpp25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 44181d1..1bcb846 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -261,7 +261,12 @@ QPixmap::QPixmap(const QString& fileName, const char *format, Qt::ImageConversio
if (!qt_pixmap_thread_test())
return;
- load(fileName, format, flags);
+ QT_TRY {
+ load(fileName, format, flags);
+ } QT_CATCH(...) {
+ deref();
+ QT_RETHROW;
+ }
}
/*!
@@ -309,12 +314,17 @@ QPixmap::QPixmap(const char * const xpm[])
if (!xpm)
return;
- QImage image(xpm);
- if (!image.isNull()) {
- if (data->pixelType() == QPixmapData::BitmapType)
- *this = QBitmap::fromImage(image);
- else
- *this = fromImage(image);
+ QT_TRY {
+ QImage image(xpm);
+ if (!image.isNull()) {
+ if (data->pixelType() == QPixmapData::BitmapType)
+ *this = QBitmap::fromImage(image);
+ else
+ *this = fromImage(image);
+ }
+ } QT_CATCH(...) {
+ deref();
+ QT_RETHROW;
}
}
#endif
@@ -1894,7 +1904,6 @@ int QPixmap::defaultDepth()
#elif defined(Q_OS_SYMBIAN)
return S60->screenDepth;
#endif
-
}
/*!