diff options
author | Jan Arve Saether <jan-arve.saether@digia.com> | 2013-04-10 10:09:22 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-10 10:34:28 +0200 |
commit | 628d3eeb4b91ef0159a87f3add5d97a77af5fec6 (patch) | |
tree | 48b5c24e940f77f4d2d2e715389dc0b58e4c440b /src | |
parent | 6a220dfc1a363d85f486d7de04834e501b60b67f (diff) | |
download | qtquickcontrols-628d3eeb4b91ef0159a87f3add5d97a77af5fec6.tar.gz |
Remove a function that doesn't serve any purpose anymore.
setupItemLayout was supposed to do initialization on each item before
it got added to the layout, but all it did was to add the attached
property to the item, which is really not needed anymore.
The layout code does not work under the assumption that each item has
the attached property anyway, so we can remove it. (And in addition
avoid some potential allocations)
Change-Id: I6d7e3e5b13531dfeaceef495de144dcf87d38cc4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/layouts/qquicklayout.cpp | 6 | ||||
-rw-r--r-- | src/layouts/qquicklayout_p.h | 2 | ||||
-rw-r--r-- | src/layouts/qquicklinearlayout.cpp | 4 |
3 files changed, 0 insertions, 12 deletions
diff --git a/src/layouts/qquicklayout.cpp b/src/layouts/qquicklayout.cpp index 68e6b6b3..7f80fa8c 100644 --- a/src/layouts/qquicklayout.cpp +++ b/src/layouts/qquicklayout.cpp @@ -198,12 +198,6 @@ QQuickLayout::~QQuickLayout() } -void QQuickLayout::setupItemLayout(QQuickItem *item) -{ - //### not needed anymore, since these are deducted from hierarcy? - qmlAttachedPropertiesObject<QQuickLayout>(item); -} - QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object) { return new QQuickLayoutAttached(object); diff --git a/src/layouts/qquicklayout_p.h b/src/layouts/qquicklayout_p.h index a13d79e3..26c06346 100644 --- a/src/layouts/qquicklayout_p.h +++ b/src/layouts/qquicklayout_p.h @@ -81,8 +81,6 @@ public: protected: bool event(QEvent *e); virtual void rearrange(const QSizeF &); - void setupItemLayout(QQuickItem *item); - enum Orientation { Vertical = 0, diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp index 4fe50b4d..c452e4fd 100644 --- a/src/layouts/qquicklinearlayout.cpp +++ b/src/layouts/qquicklinearlayout.cpp @@ -498,8 +498,6 @@ void QQuickGridLayout::insertLayoutItems() QQuickGridLayoutItem *layoutItem = new QQuickGridLayoutItem(child, row, column, rowSpan, columnSpan); d->engine.insertItem(layoutItem, -1); - - setupItemLayout(child); } } } @@ -550,8 +548,6 @@ void QQuickLinearLayout::insertLayoutItems() qSwap(gridRow, gridColumn); QQuickGridLayoutItem *layoutItem = new QQuickGridLayoutItem(child, gridRow, gridColumn, 1, 1, 0); d->engine.insertItem(layoutItem, index); - - setupItemLayout(child); } } } |