Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4545    widgets in Graphics View.
    4646    \since 4.4
    47     \ingroup multimedia
     47
    4848    \ingroup graphicsview-api
    4949
     
    6464    removeAt() will remove an item from the layout, without
    6565    destroying it.
    66    
     66
    6767    \sa QGraphicsLinearLayout, QGraphicsWidget
    6868*/
     
    9090
    9191    QGridLayoutEngine engine;
    92 #ifdef QT_DEBUG   
     92#ifdef QT_DEBUG
    9393    void dump(int indent) const;
    9494#endif
     
    101101        wid = new QWidget;
    102102    QGraphicsItem *item = parentItem();
    103     QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : qApp->style();
     103    QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
    104104    return QLayoutStyleInfo(style, wid);
    105105}
     
    122122        QGraphicsLayoutItem *item = itemAt(i);
    123123        // The following lines can be removed, but this removes the item
    124         // from the layout more efficiently than the implementation of 
     124        // from the layout more efficiently than the implementation of
    125125        // ~QGraphicsLayoutItem.
    126126        removeAt(i);
     
    142142    Q_D(QGraphicsGridLayout);
    143143    if (row < 0 || column < 0) {
    144         qWarning("QGraphicsGridLayout::addItem: invalid row/column: %d",
    145                 row < 0 ? row : column);
    146         return;
     144        qWarning("QGraphicsGridLayout::addItem: invalid row/column: %d",
     145                row < 0 ? row : column);
     146        return;
    147147    }
    148148    if (columnSpan < 1 || rowSpan < 1) {
    149         qWarning("QGraphicsGridLayout::addItem: invalid row span/column span: %d",
    150                 rowSpan < 1 ? rowSpan : columnSpan);
    151         return;
     149        qWarning("QGraphicsGridLayout::addItem: invalid row span/column span: %d",
     150                rowSpan < 1 ? rowSpan : columnSpan);
     151        return;
    152152    }
    153153    if (!item) {
    154         qWarning("QGraphicsGridLayout::addItem: cannot add null item");
    155         return;
     154        qWarning("QGraphicsGridLayout::addItem: cannot add null item");
     155        return;
     156    }
     157    if (item == this) {
     158        qWarning("QGraphicsGridLayout::addItem: cannot insert itself");
     159        return;
    156160    }
    157161
     
    648652
    649653QT_END_NAMESPACE
    650        
    651 #endif //QT_NO_GRAPHICSVIEW       
     654
     655#endif //QT_NO_GRAPHICSVIEW
Note: See TracChangeset for help on using the changeset viewer.