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/widgets/qtoolbarlayout.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**
     
    129129    if (!set) {
    130130        QObject::connect(extension, SIGNAL(clicked(bool)),
    131                         this, SLOT(setExpanded(bool)));
     131                        this, SLOT(setExpanded(bool)), Qt::UniqueConnection);
    132132        extension->setPopupMode(QToolButton::DelayedPopup);
    133133        extension->setMenu(0);
     
    335335        if (mw->unifiedTitleAndToolBarOnMac()
    336336                && mw->toolBarArea(static_cast<QToolBar *>(parentWidget())) == Qt::TopToolBarArea) {
    337             if (that->expandFlag) {
     337            if (expandFlag) {
    338338                tb->setMaximumSize(0xFFFFFF, 0xFFFFFF);
    339339            } else {
     
    361361    QStyleOptionToolBar opt;
    362362    tb->initStyleOption(&opt);
    363     const int handleExtent = movable()
    364             ? style->pixelMetric(QStyle::PM_ToolBarHandleExtent, &opt, tb) : 0;
    365363    const int margin = this->margin();
    366364    const int extensionExtent = style->pixelMetric(QStyle::PM_ToolBarExtensionExtent, &opt, tb);
     
    368366
    369367    QLayout::setGeometry(rect);
    370     if (movable()) {
    371         if (o == Qt::Horizontal) {
    372             handRect = QRect(margin, margin, handleExtent, rect.height() - 2*margin);
    373             handRect = QStyle::visualRect(parentWidget()->layoutDirection(), rect, handRect);
    374         } else {
    375             handRect = QRect(margin, margin, rect.width() - 2*margin, handleExtent);
    376         }
    377     } else {
    378         handRect = QRect();
    379     }
    380368
    381369    bool ranOutOfSpace = false;
     
    667655        return;
    668656    if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) {
    669         animating = true;
     657        animating = !tb->isWindow() && win->isAnimated();
    670658        QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout());
    671659        if (expanded) {
     
    678666            }
    679667        }
    680         layout->layoutState.toolBarAreaLayout.apply(true);
     668        layout->layoutState.toolBarAreaLayout.apply(animating);
    681669    }
    682670}
     
    743731}
    744732
    745 QRect QToolBarLayout::handleRect() const
    746 {
    747     return handRect;
    748 }
    749 
    750733QT_END_NAMESPACE
    751734
Note: See TracChangeset for help on using the changeset viewer.