Changeset 561 for trunk/src/gui/kernel/qboxlayout.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/kernel/qboxlayout.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 453 453 454 454 \ingroup geomanagement 455 \ingroup appearance456 455 457 456 QBoxLayout takes the space it gets (from its parent layout or from … … 528 527 rather than QBoxLayout because of their convenient constructors. 529 528 530 \sa QGridLayout, QStackedLayout, {Layout Classes}529 \sa QGridLayout, QStackedLayout, {Layout Management} 531 530 */ 532 531 … … 832 831 for (int i = 0; i < n; i++) { 833 832 QBoxLayoutItem *box = d->list.at(i); 834 if (box->item->hasHeightForWidth()) 833 if (box->item->hasHeightForWidth()) { 834 int width = qBound(box->item->minimumSize().width(), s.width(), box->item->maximumSize().width()); 835 835 a[i].sizeHint = a[i].minimumSize = 836 box->item->heightForWidth(s.width()); 836 box->item->heightForWidth(width); 837 } 837 838 } 838 839 } … … 926 927 b = QLayoutPrivate::createSpacerItem(this, 0, size, QSizePolicy::Minimum, QSizePolicy::Fixed); 927 928 928 QBoxLayoutItem *it = new QBoxLayoutItem(b); 929 it->magic = true; 930 d->list.insert(index, it); 929 QT_TRY { 930 QBoxLayoutItem *it = new QBoxLayoutItem(b); 931 it->magic = true; 932 d->list.insert(index, it); 933 934 } QT_CATCH(...) { 935 delete b; 936 QT_RETHROW; 937 } 931 938 invalidate(); 932 939 } … … 1028 1035 QWidgetItem *b = QLayoutPrivate::createWidgetItem(this, widget); 1029 1036 b->setAlignment(alignment); 1030 QBoxLayoutItem *it = new QBoxLayoutItem(b, stretch); 1031 d->list.insert(index, it); 1037 1038 QBoxLayoutItem *it; 1039 QT_TRY{ 1040 it = new QBoxLayoutItem(b, stretch); 1041 } QT_CATCH(...) { 1042 delete b; 1043 QT_RETHROW; 1044 } 1045 1046 QT_TRY{ 1047 d->list.insert(index, it); 1048 } QT_CATCH(...) { 1049 delete it; 1050 QT_RETHROW; 1051 } 1032 1052 invalidate(); 1033 1053 } … … 1272 1292 1273 1293 \ingroup geomanagement 1274 \ingroup appearance1275 \mainclass1276 1294 1277 1295 This class is used to construct horizontal box layout objects. See … … 1296 1314 \image qhboxlayout-with-5-children.png Horizontal box layout with five child widgets 1297 1315 1298 \sa QVBoxLayout, QGridLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example}1316 \sa QVBoxLayout, QGridLayout, QStackedLayout, {Layout Management}, {Basic Layouts Example} 1299 1317 */ 1300 1318 … … 1390 1408 1391 1409 \ingroup geomanagement 1392 \ingroup appearance1393 \mainclass1394 1410 1395 1411 This class is used to construct vertical box layout objects. See … … 1414 1430 \image qvboxlayout-with-5-children.png Horizontal box layout with five child widgets 1415 1431 1416 \sa QHBoxLayout, QGridLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example}1432 \sa QHBoxLayout, QGridLayout, QStackedLayout, {Layout Management}, {Basic Layouts Example} 1417 1433 */ 1418 1434
Note:
See TracChangeset
for help on using the changeset viewer.