diff options
author | mread <qt-info@nokia.com> | 2009-08-13 17:19:26 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2009-08-13 17:19:26 (GMT) |
commit | 8958c2dfa426115a28e4034b98f56ef318f5ccfa (patch) | |
tree | cb1fb1b1de5d201011fd446b2b45fd23222ffa49 | |
parent | f76b4e1b4a55008cc45f633c7be55ae9d063dc5b (diff) | |
download | Qt-8958c2dfa426115a28e4034b98f56ef318f5ccfa.zip Qt-8958c2dfa426115a28e4034b98f56ef318f5ccfa.tar.gz Qt-8958c2dfa426115a28e4034b98f56ef318f5ccfa.tar.bz2 |
Changing names of Symbian leave <-> qt throw translation functions
due to http://qt-reviews.europe.nokia.com/r/67/
-rw-r--r-- | doc/src/symbian-exceptionsafety.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 14 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 10 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qwindowsurface_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 4 |
9 files changed, 25 insertions, 25 deletions
diff --git a/doc/src/symbian-exceptionsafety.qdoc b/doc/src/symbian-exceptionsafety.qdoc index 4818953..cb6d5ff 100644 --- a/doc/src/symbian-exceptionsafety.qdoc +++ b/doc/src/symbian-exceptionsafety.qdoc @@ -80,7 +80,7 @@ Symbian leaves to standard C++ exceptions. The following help is provided: \list - \o \l qt_throwIfError() takes a Symbian + \o \l qt_symbian_throwIfError() takes a Symbian error code and throws an appropriate exception to represent it. This will do nothing if the error code is not in fact an error. The function is equivalent to Symbian's \c User::LeaveIfError. @@ -104,11 +104,11 @@ _LIT(KStr,"abc"); TInt pos = KStr().Locate('c'); // pos is a good value, >= 0, so no exception is thrown - qt_throwIfError(pos); + qt_symbian_throwIfError(pos); pos = KStr().Locate('d'); // pos == KErrNotFound, so this throws an exception - qt_throwIfError(pos); + qt_symbian_throwIfError(pos); // we are asking for a lot of memory, HBufC::New may return NULL, so check it HBufC *buffer = q_check_ptr(HBufC::New(1000000)); @@ -137,11 +137,11 @@ provided: \list - \o \l qt_exception2SymbianError() - + \o \l qt_symbian_exception2Error() - this takes a standard exception and gives an appropriate Symbian error code. If no mapping is known for the exception type, \c KErrGeneral is returned. - \o \l qt_exception2SymbianLeaveL() - + \o \l qt_symbian_exception2LeaveL() - this takes a standard exception and generates an appropriate Symbian leave. \o \l QT_TRYCATCH_ERROR() - this macro diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 2a71e29..6d88c91 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -3383,9 +3383,9 @@ public: \warning This function is only available on Symbian. - \sa qt_exception2SymbianLeaveL(), qt_exception2SymbianError() + \sa qt_symbian_exception2LeaveL(), qt_symbian_exception2Error() */ -void qt_throwIfError(int error) +void qt_symbian_throwIfError(int error) { if (error >= KErrNone) return; // do nothing - not an exception @@ -3410,11 +3410,11 @@ void qt_throwIfError(int error) \warning This function is only available on Symbian. - \sa qt_throwIfError(), qt_exception2SymbianError() + \sa qt_symbian_throwIfError(), qt_symbian_exception2Error() */ -void qt_exception2SymbianLeaveL(const std::exception& aThrow) +void qt_symbian_exception2LeaveL(const std::exception& aThrow) { - User::Leave(qt_exception2SymbianError(aThrow)); + User::Leave(qt_symbian_exception2Error(aThrow)); } /*! \relates <QtGlobal> @@ -3424,9 +3424,9 @@ void qt_exception2SymbianLeaveL(const std::exception& aThrow) \warning This function is only available on Symbian. - \sa qt_throwIfError(), qt_exception2SymbianLeaveL() + \sa qt_symbian_throwIfError(), qt_symbian_exception2LeaveL() */ -int qt_exception2SymbianError(const std::exception& aThrow) +int qt_symbian_exception2Error(const std::exception& aThrow) { const std::type_info& atype = typeid(aThrow); int err = KErrGeneral; diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 35edb20..b4ae2dc 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2401,15 +2401,15 @@ QT_END_NAMESPACE namespace std { class exception; } #endif QT_BEGIN_NAMESPACE -Q_CORE_EXPORT void qt_throwIfError(int error); -Q_CORE_EXPORT void qt_exception2SymbianLeaveL(const std::exception& ex); -Q_CORE_EXPORT int qt_exception2SymbianError(const std::exception& ex); +Q_CORE_EXPORT void qt_symbian_throwIfError(int error); +Q_CORE_EXPORT void qt_symbian_exception2LeaveL(const std::exception& ex); +Q_CORE_EXPORT int qt_symbian_exception2Error(const std::exception& ex); #define QT_TRAP_THROWING(_f) \ { \ TInt ____error; \ TRAP(____error, _f); \ - qt_throwIfError(____error); \ + qt_symbian_throwIfError(____error); \ } #define QT_TRYCATCH_ERROR(_err, _f) \ @@ -2418,7 +2418,7 @@ Q_CORE_EXPORT int qt_exception2SymbianError(const std::exception& ex); try { \ _f; \ } catch (const std::exception &____ex) { \ - _err = qt_exception2SymbianError(____ex); \ + _err = qt_symbian_exception2Error(____ex); \ } \ } diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 02edfb0..ed55ef6 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -747,7 +747,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla m_noSocketEvents = oldNoSocketEventsValue; } QT_CATCH (const std::exception& ex) { #ifndef QT_NO_EXCEPTIONS - CActiveScheduler::Current()->Error(qt_exception2SymbianError(ex)); + CActiveScheduler::Current()->Error(qt_symbian_exception2Error(ex)); #endif } diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp index 3b8ee82..a176ede 100644 --- a/src/gui/kernel/qeventdispatcher_s60.cpp +++ b/src/gui/kernel/qeventdispatcher_s60.cpp @@ -76,7 +76,7 @@ bool QEventDispatcherS60::processEvents ( QEventLoop::ProcessEventsFlags flags ) m_noInputEvents = oldNoInputEventsValue; } QT_CATCH (const std::exception& ex) { #ifndef QT_NO_EXCEPTIONS - CActiveScheduler::Current()->Error(qt_exception2SymbianError(ex)); + CActiveScheduler::Current()->Error(qt_symbian_exception2Error(ex)); #endif } diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index a21c0e7..f8a5be5 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -656,7 +656,7 @@ CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) break; } - qt_throwIfError(fbsBitmap->Create(size, mode)); + qt_symbian_throwIfError(fbsBitmap->Create(size, mode)); fbsBitmap->LockHeap(); QImage image = pixmap.toImage(); diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index d13dc87..714c9e8 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -76,7 +76,7 @@ QS60WindowSurface::QS60WindowSurface(QWidget* widget) // We create empty CFbsBitmap here -> it will be resized in setGeometry d_ptr->bitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new - qt_throwIfError( d_ptr->bitmap->Create(TSize(0, 0), mode ) ); + qt_symbian_throwIfError( d_ptr->bitmap->Create(TSize(0, 0), mode ) ); updatePaintDeviceOnBitmap(); @@ -180,7 +180,7 @@ void QS60WindowSurface::setGeometry(const QRect& rect) QWindowSurface::setGeometry(rect); TRect nativeRect(qt_QRect2TRect(rect)); - qt_throwIfError(d_ptr->bitmap->Resize(nativeRect.Size())); + qt_symbian_throwIfError(d_ptr->bitmap->Resize(nativeRect.Size())); if (!rect.isNull()) updatePaintDeviceOnBitmap(); diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 39fc5e1..3fc3744 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -221,7 +221,7 @@ static void initializeDb() QS60Data::screenDevice()->TypefaceSupport(typefaceSupport, i); CFont *font; // We have to get a font instance in order to know all the details TFontSpec fontSpec(typefaceSupport.iTypeface.iName, 11); - qt_throwIfError(QS60Data::screenDevice()->GetNearestFontInPixels(font, fontSpec)); + qt_symbian_throwIfError(QS60Data::screenDevice()->GetNearestFontInPixels(font, fontSpec)); if (font->TypeUid() == KCFbsFontUid) { TOpenFontFaceAttrib faceAttrib; const CFbsFont *cfbsFont = dynamic_cast<const CFbsFont *>(font); diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index d3de8e2..ebff9c8 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -132,9 +132,9 @@ QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Exte QS60WindowSurface::unlockBitmapHeap(); m_textRenderBitmap = q_check_ptr(new CFbsBitmap()); // CBase derived object needs check on new const TSize bitmapSize(1, 1); // It is just a dummy bitmap that I need to keep the font alive (or maybe not) - qt_throwIfError(m_textRenderBitmap->Create(bitmapSize, EGray256)); + qt_symbian_throwIfError(m_textRenderBitmap->Create(bitmapSize, EGray256)); QT_TRAP_THROWING(m_textRenderBitmapDevice = CFbsBitmapDevice::NewL(m_textRenderBitmap)); - qt_throwIfError(m_textRenderBitmapDevice->CreateContext(m_textRenderBitmapGc)); + qt_symbian_throwIfError(m_textRenderBitmapDevice->CreateContext(m_textRenderBitmapGc)); cache_cost = sizeof(QFontEngineS60) + bitmapSize.iHeight * bitmapSize.iWidth * 4; TFontSpec fontSpec(qt_QString2TPtrC(request.family), m_fontSizeInPixels); |