Changeset 651 for trunk/src/gui/kernel/qwidget.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qwidget.cpp
r569 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 1446 1446 #endif 1447 1447 1448 if (QWidgetBackingStore *bs = d->maybeBackingStore()) { 1448 if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { 1449 // Okay, we are about to destroy the top-level window that owns 1450 // the backing store. Make sure we delete the backing store right away 1451 // before the window handle is invalid. This is important because 1452 // the backing store will delete its window surface, which may or may 1453 // not have a reference to this widget that will be used later to 1454 // notify the window it no longer has a surface. 1455 delete d->extra->topextra->backingStore; 1456 d->extra->topextra->backingStore = 0; 1457 } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { 1449 1458 bs->removeDirtyWidget(this); 1450 1459 if (testAttribute(Qt::WA_StaticContents)) … … 2033 2042 #endif 2034 2043 2044 2045 2046 2047 2048 2049 2050 2051 2035 2052 if (q->testAttribute(Qt::WA_OpaquePaintEvent) || q->testAttribute(Qt::WA_PaintOnScreen)) { 2036 2053 setOpaque(true); … … 3095 3112 QInputContext *qic = focusWidget->d_func()->inputContext(); 3096 3113 if (enable) { 3097 qic->setFocusWidget(focusWidget); 3114 if (focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) 3115 qic->setFocusWidget(focusWidget); 3098 3116 } else { 3099 3117 qic->reset(); … … 6412 6430 } 6413 6431 6432 6433 6414 6434 6415 6435 if (QWidget *sp = second->focusProxy()) … … 10399 10419 QWidget *focusWidget = d->effectiveFocusWidget(); 10400 10420 QInputContext *ic = 0; 10401 if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) { 10421 if (on && !internalWinId() && hasFocus() 10422 && focusWidget->testAttribute(Qt::WA_InputMethodEnabled)) { 10402 10423 ic = focusWidget->d_func()->inputContext(); 10403 ic->reset(); 10404 ic->setFocusWidget(0); 10424 if (ic) { 10425 ic->reset(); 10426 ic->setFocusWidget(0); 10427 } 10405 10428 } 10406 #endif10407 10429 if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget()) 10408 10430 parentWidget()->d_func()->enforceNativeChildren(); 10409 10431 if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created)) 10410 10432 d->createWinId(); 10411 #ifndef QT_NO_IM 10412 if (ic && isEnabled())10433 if (ic && isEnabled() && focusWidget->isEnabled() 10434 10413 10435 ic->setFocusWidget(focusWidget); 10436 10414 10437 #endif //QT_NO_IM 10415 10438 break; … … 10449 10472 if (ic) { 10450 10473 if (on && hasFocus() && ic->focusWidget() != focusWidget && isEnabled()) { 10474 10451 10475 ic->setFocusWidget(focusWidget); 10452 10476 } else if (!on && ic->focusWidget() == focusWidget) {
Note:
See TracChangeset
for help on using the changeset viewer.