diff options
author | David Boddie <dboddie@trolltech.com> | 2009-06-11 11:16:05 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-06-11 11:16:05 (GMT) |
commit | 5b4ee7641fb8b6a60f7293139028eb91d012ccd6 (patch) | |
tree | 5d4faeca8b288f55bd5b218ccc29c2da38142568 /src/corelib | |
parent | b487ec78791b08d9a6568f4b0ab7c0479b5124a2 (diff) | |
parent | d5f6ac0e25ddf84c908965eb5de68fe84cf897f3 (diff) | |
download | Qt-5b4ee7641fb8b6a60f7293139028eb91d012ccd6.zip Qt-5b4ee7641fb8b6a60f7293139028eb91d012ccd6.tar.gz Qt-5b4ee7641fb8b6a60f7293139028eb91d012ccd6.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 48 | ||||
-rw-r--r-- | src/corelib/tools/qscopedpointer.cpp | 2 |
2 files changed, 46 insertions, 4 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index a828e84..6590ea6 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2207,10 +2207,10 @@ void qt_message_output(QtMsgType msgType, const char *buf) */ static void qEmergencyOut(QtMsgType msgType, const char *msg, va_list ap) { - char emergency_buf[1024] = { '\0' }; - emergency_buf[1023] = '\0'; + char emergency_buf[256] = { '\0' }; + emergency_buf[255] = '\0'; if (msg) - qvsnprintf(emergency_buf, 1023, msg, ap); + qvsnprintf(emergency_buf, 255, msg, ap); qt_message_output(msgType, emergency_buf); } #endif @@ -3225,6 +3225,18 @@ bool QInternal::callFunction(InternalFunction func, void **args) \warning This macro is only available on Symbian. + Example: + + \code + // A Symbian leaving function is being called within a Qt function. + // Any leave must be converted to an exception + CAknTitlePane* titlePane = S60->titlePane(); + if (titlePane) { + TPtrC captionPtr(qt_QString2TPtrC(caption)); + QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(titlePane->SetTextL(captionPtr)); + } + \endcode + \sa QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(), QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE() */ @@ -3239,6 +3251,23 @@ bool QInternal::callFunction(InternalFunction func, void **args) \warning This macro is only available on Symbian. + Example: + + \code + // An exception might be thrown in this Symbian TInt error returning function. + // It is caught and translated to an error code + TInt QServerApp::Connect(const QString &serverName) + { + TPtrC name; + TInt err; + QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR(err, name.Set(qt_QString2TPtrC(serverName))); + if (err != KErrNone) + return err; + return iServer.Connect(name); + } + \endcode +} + \sa QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(), QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION() */ @@ -3253,6 +3282,19 @@ bool QInternal::callFunction(InternalFunction func, void **args) \warning This macro is only available on Symbian. + Example: + + \code + // This active object signals Qt code + // Exceptions from the Qt code must be converted to Symbian OS leaves for the active scheduler + void QWakeUpActiveObject::RunL() + { + iStatus = KRequestPending; + SetActive(); + QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_LEAVE(m_dispatcher->wakeUpWasCalled()); + } + \endcode + \sa QT_TRANSLATE_SYMBIAN_LEAVE_TO_EXCEPTION(), QT_TRANSLATE_EXCEPTION_TO_SYMBIAN_ERROR() */ diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 8150a18..f34aec8 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -112,7 +112,7 @@ /*! \fn void QScopedPointer::reset(T *other = 0) - Deletes the existing object its pointing to if any, and sets its pointer to + Deletes the existing object it is pointing to if any, and sets its pointer to \a other. QScopedPointer now owns \a other and will delete it in its destructor. |