summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-18 17:38:55 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-19 10:58:35 (GMT)
commitc6cc767cb065ca77aba06fe15830c22f187e370c (patch)
treee7f17f5fccbd06489c3c29b9dbd0605f850082f7 /src/openvg
parent156d1590b405d1d374b5b8c87f5388718462c5e1 (diff)
downloadQt-c6cc767cb065ca77aba06fe15830c22f187e370c.zip
Qt-c6cc767cb065ca77aba06fe15830c22f187e370c.tar.gz
Qt-c6cc767cb065ca77aba06fe15830c22f187e370c.tar.bz2
Prefer Q_CHECK_PTR to q_check_ptr
With the macro version we get proper debug output (with __FILE__, __LINE__ annotations) when compiling with -no-exceptions and !QT_NO_DEBUG. All changes in this patch affect assignment to local variables, where the order of assignment versus actual pointer check is not important. Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qvg_symbian.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index 0e6e773..0d2425f 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -77,7 +77,8 @@ extern int qt_vg_pixmap_serial;
static CFbsBitmap* createBlitCopy(CFbsBitmap* bitmap)
{
- CFbsBitmap *copy = q_check_ptr(new CFbsBitmap);
+ CFbsBitmap *copy = new CFbsBitmap;
+ Q_CHECK_PTR(copy);
if(!copy)
return 0;
@@ -255,7 +256,8 @@ void* QVGPixmapData::toNativeType(NativeType type)
sgInfo.iSizeInPixels.SetSize(w, h);
sgInfo.iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface;
- RSgImage *sgImage = q_check_ptr(new RSgImage());
+ RSgImage *sgImage = new RSgImage();
+ Q_CHECK_PTR(sgImage);
err = sgImage->Create(sgInfo, NULL, NULL);
if (err != KErrNone) {
driver.Close();
@@ -297,7 +299,8 @@ void* QVGPixmapData::toNativeType(NativeType type)
return reinterpret_cast<void*>(sgImage);
#endif
} else if (type == QPixmapData::FbsBitmap) {
- CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);
+ CFbsBitmap *bitmap = new CFbsBitmap;
+ Q_CHECK_PTR(bitmap);
if (bitmap) {
if (bitmap->Create(TSize(source.width(), source.height()),