Timestamp:
May 5, 2011, 5:36:53 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/graphicsview/qgraphicswidget_p.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    4545
    4646#include <QtCore/qdebug.h>
     47
    4748#include "qgraphicswidget_p.h"
    4849#include "qgraphicslayout.h"
     
    7172    windowFlags = wFlags;
    7273
    73     q->setParentItem(parentItem);
     74    if (parentItem)
     75        setParentItemHelper(parentItem, 0, 0);
     76
    7477    q->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::DefaultType));
    7578    q->setGraphicsItem(q);
     
    7780    resolveLayoutDirection();
    7881    q->unsetWindowFrameMargins();
    79     q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
    80     q->setFlag(QGraphicsItem::ItemSendsGeometryChanges);
     82    flags |= QGraphicsItem::ItemUsesExtendedStyleOption;
     83    flags |= QGraphicsItem::ItemSendsGeometryChanges;
     84    if (windowFlags & Qt::Window)
     85        flags |= QGraphicsItem::ItemIsPanel;
    8186}
    8287
     
    250255void QGraphicsWidgetPrivate::resolveFont(uint inheritedMask)
    251256{
     257
    252258    inheritedFontResolveMask = inheritedMask;
     259
     260
    253261    QFont naturalFont = naturalWidgetFont();
    254262    QFont resolvedFont = font.resolve(naturalFont);
     
    757765    QGraphicsWidget *firstOld = 0;
    758766    bool wasPreviousNew = true;
    759    
     767
    760768    while (w != q) {
    761769        bool isCurrentNew = q->isAncestorOf(w);
     
    792800
    793801    if (oldScene && newScene != oldScene)
    794         oldScene->d_func()->tabFocusFirst = firstOld;
     802        oldScene->d_func()->tabFocusFirst = ;
    795803
    796804    QGraphicsItem *topLevelItem = newParent ? newParent->topLevelItem() : 0;
     
    826834}
    827835
     836
     837
     838
     839
     840
     841
     842
     843
     844
     845
     846
     847
     848
     849
     850
     851
     852
     853
     854
     855
     856
     857
     858
     859
     860
     861
     862
     863
     864
     865
     866
     867
     868
     869
     870
     871
     872
     873
     874
     875
     876
     877
     878
     879
     880
     881
     882
     883
     884
     885
    828886void QGraphicsWidgetPrivate::setGeometryFromSetPos()
    829887{
Note: See TracChangeset for help on using the changeset viewer.