Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qwidget.cpp

    r677 r769  
    123123#include "private/qgesturemanager_p.h"
    124124
     125
     126
     127
     128
    125129// widget/widget data creation count
    126130//#define QWIDGET_EXTRA_DEBUG
     
    197201      , isScrolled(0)
    198202      , isMoved(0)
     203
    199204      , usesDoubleBufferedGLContext(0)
    200205#if defined(Q_WS_X11)
     
    207212#elif defined(Q_WS_MAC)
    208213      , needWindowChange(0)
    209       , isGLWidget(0)
    210214      , window_event(0)
    211215      , qd_hd(0)
     
    14461450#endif
    14471451
     1452
    14481453    if (d->extra && d->extra->topextra && d->extra->topextra->backingStore) {
    14491454        // Okay, we are about to destroy the top-level window that owns
     
    14551460        delete d->extra->topextra->backingStore;
    14561461        d->extra->topextra->backingStore = 0;
    1457     } else if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
     1462    }
     1463#endif
     1464    if (QWidgetBackingStore *bs = d->maybeBackingStore()) {
    14581465        bs->removeDirtyWidget(this);
    14591466        if (testAttribute(Qt::WA_StaticContents))
     
    14871494        QWidgetPrivate::allWidgets->remove(this);
    14881495
    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    }
    14911502}
    14921503
     
    16761687        dirty = QRegion();
    16771688    } else if (QWidgetBackingStore *bs = maybeBackingStore()) {
     1689
     1690
     1691
     1692
     1693
    16781694        bs->sync();
     1695
    16791696    }
    16801697}
     
    16841701    if (paintOnScreen())
    16851702        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
    16871709        bs->sync(q_func(), region);
     1710
     1711
    16881712}
    16891713
     
    33683392    appear on screen. This also applies to windows.
    33693393
    3370     \sa pos, geometry, minimumSize, maximumSize, resizeEvent()
     3394    \sa pos, geometry, minimumSize, maximumSize, resizeEvent()
    33713395*/
    33723396
     
    61106134            if (previousProxyFocus && previousProxyFocus->focusProxy())
    61116135                previousProxyFocus = previousProxyFocus->focusProxy();
     6136
     6137
    61126138        }
    61136139    }
     
    75227548        if (!widget || widget->isWindow() || widget->testAttribute(Qt::WA_WState_Hidden))
    75237549            continue;
     7550
     7551
     7552
     7553
     7554
     7555
     7556
     7557
     7558
     7559
     7560
     7561
     7562
     7563
     7564
     7565
     7566
    75247567        if (spontaneous)
    75257568            widget->setAttribute(Qt::WA_Mapped, false);
     
    79167959    if(w && w->isWindow() && w->isVisible() && w->isEnabled()) {
    79177960        LONG dwStyle = GetWindowLong(w->winId(), GWL_STYLE);
     7961
    79187962        if (setStyle)
    7919             dwStyle |= WS_DISABLED;
     7963            wStyle |= WS_DISABLED;
    79207964        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        }
    79257971    }
    79267972}
     
    82628308
    82638309#ifdef QT_SOFTKEYS_ENABLED
    8264         if (isWindow() && isActiveWindow())
     8310        if (isWindow())
    82658311            QSoftKeyManager::updateSoftKeys();
    82668312#endif
     
    1173111777    return targetWidget;
    1173211778}
     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
    1173311818#endif
    1173411819
Note: See TracChangeset for help on using the changeset viewer.