diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-09-01 10:32:03 (GMT) |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-09-01 10:32:03 (GMT) |
commit | 274619e086e6e9ebba6c383ffb837dc140c840e7 (patch) | |
tree | b156bcf32c56a5e22a5c29d2af19bc37c5a8f797 | |
parent | 9f51c31a0f492c20e6d882b2ae1e036b29c2755c (diff) | |
parent | b7c57a2e26a325a1876bd7c68d9f187da084d569 (diff) | |
download | Qt-274619e086e6e9ebba6c383ffb837dc140c840e7.zip Qt-274619e086e6e9ebba6c383ffb837dc140c840e7.tar.gz Qt-274619e086e6e9ebba6c383ffb837dc140c840e7.tar.bz2 |
Merge branch 4.7 into qt-4.8-from-4.7
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 10 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 8 | ||||
-rw-r--r-- | src/s60installs/bwins/QtGuiu.def | 2 | ||||
-rw-r--r-- | src/s60installs/eabi/QtGuiu.def | 2 |
7 files changed, 18 insertions, 13 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 75ce9e0..56338b2 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -475,8 +475,8 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget) windowToMove->setUpdatesEnabled(false); if (!alwaysResize) { - if (gv->scene()) { - if (gv->scene()->focusItem() && S60->partial_keyboardAutoTranslation) { + if (gv->scene() && S60->partial_keyboardAutoTranslation) { + if (gv->scene()->focusItem()) { // Check if the widget contains cursorPositionChanged signal and disconnect from it. QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())); int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1)); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index ad8fbb7..0aa1dfa 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -345,6 +345,10 @@ QWidgetPrivate::QWidgetPrivate(int version) QWidgetPrivate::~QWidgetPrivate() { +#ifdef Q_OS_SYMBIAN + _q_cleanupWinIds(); +#endif + if (widgetItem) widgetItem->wid = 0; @@ -12668,9 +12672,11 @@ void QWidget::clearMask() */ #ifdef Q_OS_SYMBIAN -void QWidgetPrivate::_q_delayedDestroy(WId winId) +void QWidgetPrivate::_q_cleanupWinIds() { - delete winId; + foreach (WId wid, widCleanupList) + delete wid; + widCleanupList.clear(); } #endif diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h index 1a9987d..8306ed4 100644 --- a/src/gui/kernel/qwidget.h +++ b/src/gui/kernel/qwidget.h @@ -806,7 +806,7 @@ private: Q_DISABLE_COPY(QWidget) Q_PRIVATE_SLOT(d_func(), void _q_showIfNotHidden()) #ifdef Q_OS_SYMBIAN - Q_PRIVATE_SLOT(d_func(), void _q_delayedDestroy(WId winId)) + Q_PRIVATE_SLOT(d_func(), void void _q_cleanupWinIds()) #endif QWidgetData *data; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index ad65274..aefffb6 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -419,7 +419,7 @@ public: #ifdef Q_OS_SYMBIAN void setSoftKeys_sys(const QList<QAction*> &softkeys); void activateSymbianWindow(WId wid = 0); - void _q_delayedDestroy(WId winId); + void _q_cleanupWinIds(); #endif void raise_sys(); @@ -914,6 +914,7 @@ public: void s60UpdateIsOpaque(); void reparentChildren(); void registerTouchWindow(); + QList<WId> widCleanupList; #endif }; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 807f68e..2b51aaa 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -58,9 +58,7 @@ #endif // This is necessary in order to be able to perform delayed invocation on slots -// which take arguments of type WId. One example is -// QWidgetPrivate::_q_delayedDestroy, which is used to delay destruction of -// CCoeControl objects until after the CONE event handler has finished running. +// which take arguments of type WId. Q_DECLARE_METATYPE(WId) // Workaround for the fact that S60 SDKs 3.x do not contain the akntoolbar.h @@ -491,8 +489,8 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de // Delay deletion of the control in case this function is called in the // context of a CONE event handler such as // CCoeControl::ProcessPointerEventL - QMetaObject::invokeMethod(q, "_q_delayedDestroy", - Qt::QueuedConnection, Q_ARG(WId, destroyw)); + widCleanupList << destroyw; + QMetaObject::invokeMethod(q, "_q_cleanupWinIds", Qt::QueuedConnection); } if (q->testAttribute(Qt::WA_AcceptTouchEvents)) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index e05f0b8..40886ef 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -1901,7 +1901,7 @@ EXPORTS ?ResourceFileName@QS60MainApplication@@UBE?AV?$TBuf@$0BAA@@@XZ @ 1900 NONAME ; class TBuf<256> QS60MainApplication::ResourceFileName(void) const ?RestoreMenuL@QS60MainAppUi@@UAEXPAVCCoeControl@@HW4TMenuType@MEikMenuObserver@@@Z @ 1901 NONAME ; void QS60MainAppUi::RestoreMenuL(class CCoeControl *, int, enum MEikMenuObserver::TMenuType) ?_q_clipboardChanged@QLineControl@@AAEXXZ @ 1902 NONAME ; void QLineControl::_q_clipboardChanged(void) - ?_q_delayedDestroy@QWidgetPrivate@@QAEXPAVCCoeControl@@@Z @ 1903 NONAME ; void QWidgetPrivate::_q_delayedDestroy(class CCoeControl *) + ?_q_delayedDestroy@QWidgetPrivate@@QAEXPAVCCoeControl@@@Z @ 1903 NONAME ABSENT ; void QWidgetPrivate::_q_delayedDestroy(class CCoeControl *) ?_q_deleteSelected@QLineControl@@AAEXXZ @ 1904 NONAME ; void QLineControl::_q_deleteSelected(void) ?_q_showIfNotHidden@QWidgetPrivate@@QAEXXZ @ 1905 NONAME ; void QWidgetPrivate::_q_showIfNotHidden(void) ?about@QMessageBox@@SAXPAVQWidget@@ABVQString@@1@Z @ 1906 NONAME ; void QMessageBox::about(class QWidget *, class QString const &, class QString const &) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 38c67b9..b450806 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11593,7 +11593,7 @@ EXPORTS _ZN13QSymbianEventD2Ev @ 11592 NONAME _ZN14QFileOpenEventC1ERK4QUrl @ 11593 NONAME _ZN14QFileOpenEventC2ERK4QUrl @ 11594 NONAME - _ZN14QWidgetPrivate17_q_delayedDestroyEP11CCoeControl @ 11595 NONAME + _ZN14QWidgetPrivate17_q_delayedDestroyEP11CCoeControl @ 11595 NONAME ABSENT _ZN14QWidgetPrivate21activateSymbianWindowEP11CCoeControl @ 11596 NONAME _ZN14QWidgetPrivate26nearestGraphicsProxyWidgetEPK7QWidget @ 11597 NONAME _ZN14QWidgetPrivate36invalidateGraphicsEffectsRecursivelyEv @ 11598 NONAME |