Changeset 769 for trunk/src/gui/kernel/qwidget.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qwidget.cpp
r677 r769 123 123 #include "private/qgesturemanager_p.h" 124 124 125 126 127 128 125 129 // widget/widget data creation count 126 130 //#define QWIDGET_EXTRA_DEBUG … … 197 201 , isScrolled(0) 198 202 , isMoved(0) 203 199 204 , usesDoubleBufferedGLContext(0) 200 205 #if defined(Q_WS_X11) … … 207 212 #elif defined(Q_WS_MAC) 208 213 , needWindowChange(0) 209 , isGLWidget(0)210 214 , window_event(0) 211 215 , qd_hd(0) … … 1446 1450 #endif 1447 1451 1452 1448 1453 if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) { 1449 1454 // Okay, we are about to destroy the top-level window that owns … … 1455 1460 delete d->extra->topextra->backingStore; 1456 1461 d->extra->topextra->backingStore = 0; 1457 } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) { 1462 } 1463 #endif 1464 if (QWidgetBackingStore *bs = d->maybeBackingStore()) { 1458 1465 bs->removeDirtyWidget(this); 1459 1466 if (testAttribute(Qt::WA_StaticContents)) … … 1487 1494 QWidgetPrivate::allWidgets->remove(this); 1488 1495 1489 QEvent e(QEvent::Destroy); 1490 QCoreApplication::sendEvent(this, &e); 1496 QT_TRY { 1497 QEvent e(QEvent::Destroy); 1498 QCoreApplication::sendEvent(this, &e); 1499 } QT_CATCH(const std::exception&) { 1500 // if this fails we can't do anything about it but at least we are not allowed to throw. 1501 } 1491 1502 } 1492 1503 … … 1676 1687 dirty = QRegion(); 1677 1688 } else if (QWidgetBackingStore *bs = maybeBackingStore()) { 1689 1690 1691 1692 1693 1678 1694 bs->sync(); 1695 1679 1696 } 1680 1697 } … … 1684 1701 if (paintOnScreen()) 1685 1702 repaint_sys(region); 1686 else if (QWidgetBackingStore *bs = maybeBackingStore()) 1703 else if (QWidgetBackingStore *bs = maybeBackingStore()) { 1704 #ifdef QT_MAC_USE_COCOA 1705 Q_UNUSED(bs); 1706 void qt_mac_set_needs_display(QWidget *, QRegion); 1707 qt_mac_set_needs_display(q_func(), region); 1708 #else 1687 1709 bs->sync(q_func(), region); 1710 1711 1688 1712 } 1689 1713 … … 3368 3392 appear on screen. This also applies to windows. 3369 3393 3370 \sa pos, geometry, minimumSize, maximumSize, resizeEvent() 3394 \sa pos, geometry, minimumSize, maximumSize, resizeEvent() 3371 3395 */ 3372 3396 … … 6110 6134 if (previousProxyFocus && previousProxyFocus->focusProxy()) 6111 6135 previousProxyFocus = previousProxyFocus->focusProxy(); 6136 6137 6112 6138 } 6113 6139 } … … 7522 7548 if (!widget || widget->isWindow() || widget->testAttribute(Qt::WA_WState_Hidden)) 7523 7549 continue; 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7524 7567 if (spontaneous) 7525 7568 widget->setAttribute(Qt::WA_Mapped, false); … … 7916 7959 if(w && w->isWindow() && w->isVisible() && w->isEnabled()) { 7917 7960 LONG dwStyle = GetWindowLong(w->winId(), GWL_STYLE); 7961 7918 7962 if (setStyle) 7919 dwStyle |= WS_DISABLED;7963 wStyle |= WS_DISABLED; 7920 7964 else 7921 dwStyle &= ~WS_DISABLED; 7922 SetWindowLong(w->winId(), GWL_STYLE, dwStyle); 7923 // we might need to repaint in some situations (eg. menu) 7924 w->repaint(); 7965 newStyle &= ~WS_DISABLED; 7966 if (newStyle != dwStyle) { 7967 SetWindowLong(w->winId(), GWL_STYLE, newStyle); 7968 // we might need to repaint in some situations (eg. menu) 7969 w->repaint(); 7970 } 7925 7971 } 7926 7972 } … … 8262 8308 8263 8309 #ifdef QT_SOFTKEYS_ENABLED 8264 if (isWindow() && isActiveWindow())8310 if (isWindow()) 8265 8311 QSoftKeyManager::updateSoftKeys(); 8266 8312 #endif … … 11731 11777 return targetWidget; 11732 11778 } 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 11792 11793 11794 11795 11796 11797 11798 11799 11800 11801 11802 11803 11804 11805 11806 11807 11808 11809 11810 11811 11812 11813 11814 11815 11816 11817 11733 11818 #endif 11734 11819
Note:
See TracChangeset
for help on using the changeset viewer.