diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-08-18 19:38:55 +0200 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-08-19 12:58:35 +0200 |
commit | c6cc767cb065ca77aba06fe15830c22f187e370c (patch) | |
tree | e7f17f5fccbd06489c3c29b9dbd0605f850082f7 /src/gui/text/qfontengine_s60.cpp | |
parent | 156d1590b405d1d374b5b8c87f5388718462c5e1 (diff) |
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/gui/text/qfontengine_s60.cpp')
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 52a1fe70b1..a25970b4b9 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -122,7 +122,8 @@ QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag)); TInt error = KErrNone; TInt tableByteLength = 0; - TAny *table = q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength)); + TAny *table = m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength); + Q_CHECK_PTR(table); QByteArray result(static_cast<const char*>(table), tableByteLength); m_trueTypeExtension->ReleaseTrueTypeTable(table); return result; @@ -136,8 +137,8 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len bool result = true; TInt error = KErrNone; TInt tableByteLength; - TAny *table = - q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength)); + TAny *table = m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength); + Q_CHECK_PTR(table); if (error != KErrNone) { return false; |