diff options
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 3d901c4474..67cb6bd4a2 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1332,7 +1332,21 @@ TCoeInputCapabilities QSymbianControl::InputCapabilities() const } #endif -void QSymbianControl::Draw(const TRect& controlRect) const +void QSymbianControl::Draw(const TRect& aRect) const +{ + int leaveCode = 0; + int exceptionCode = 0; + // Implementation of CCoeControl::Draw() must never leave or throw exception. + // In native Symbian code this is considered a fatal error, and it causes + // process termination. + TRAP(leaveCode, QT_TRYCATCH_ERROR(exceptionCode, doDraw(aRect))); + if (leaveCode) + qWarning() << "QSymbianControl::doDraw leaved with code " << leaveCode; + else if (exceptionCode) + qWarning() << "QSymbianControl::doDraw threw exception with code " << exceptionCode; +} + +void QSymbianControl::doDraw(const TRect& controlRect) const { // Set flag to avoid calling DrawNow in window surface QWidget *window = qwidget->window(); diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 8c2728a0db..4fd194625b 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -332,6 +332,7 @@ private: #endif bool isSplitViewWidget(QWidget *widget); bool hasFocusedAndVisibleChild(QWidget *parentWidget); + void doDraw(const TRect& aRect) const; public: void handleClientAreaChange(); |