aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickimplicitsizeitem.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-06-01 14:52:23 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-06-21 13:20:36 +0000
commit87d9baa677edd7aee5c3c6544b4fc1770f7e5ac8 (patch)
tree9bb1a4c287a9c0b44715617f0e09f78504087d99 /src/quick/items/qquickimplicitsizeitem.cpp
parent0148389356ca1741520f671e88266b5a7768239c (diff)
QQuickImplicitSizeItem: don't redefine implicit size change signals
f7ada9b9 redefined QQuickItem's implicitWidthChanged and implicitHeightChanged signals in order to avoid warnings. 2ca187ca makes it possible to reuse the base class' signals as long as they don't have parameters. This change should be transparent to users. [ChangeLog][QtQuick][Important Behavior Change] The implicitWidthChanged2 and implicitHeightChanged2 signals of QQuickImplicitSizeItem have been removed. Although these were undocumented and hence private API, any applications currently using them should use the public implicitWidthChanged and implicitHeightChanged signals. Task-number: QTCREATORBUG-15000 Change-Id: I35cfdefc6c992f4529b60c979265650c91ba8549 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/quick/items/qquickimplicitsizeitem.cpp')
-rw-r--r--src/quick/items/qquickimplicitsizeitem.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/quick/items/qquickimplicitsizeitem.cpp b/src/quick/items/qquickimplicitsizeitem.cpp
index 1996fb9489..2569b2a224 100644
--- a/src/quick/items/qquickimplicitsizeitem.cpp
+++ b/src/quick/items/qquickimplicitsizeitem.cpp
@@ -45,29 +45,11 @@ QT_BEGIN_NAMESPACE
/*!
\internal
- The purpose of QQuickImplicitSizeItem is not immediately clear, as both
- the implicit size properties and signals exist on QQuickItem. However,
- for some items - where the implicit size has an underlying meaning (such as
- Image, where the implicit size represents the real size of the image)
- having implicit size writable is an undesirable thing.
-
- QQuickImplicitSizeItem redefines the properties as being readonly.
- Unfortunately, this also means they need to redefine the change signals.
- See QTBUG-30258 for more information.
+ QQuickImplicitSizeItem redefines the implicitWidth and implicitHeight
+ properties as readonly, as some items (e.g. Image, where the implicit size
+ represents the real size of the image) should not be able to have their
+ implicit size modified.
*/
-void QQuickImplicitSizeItemPrivate::implicitWidthChanged()
-{
- Q_Q(QQuickImplicitSizeItem);
- QQuickItemPrivate::implicitWidthChanged();
- emit q->implicitWidthChanged2();
-}
-
-void QQuickImplicitSizeItemPrivate::implicitHeightChanged()
-{
- Q_Q(QQuickImplicitSizeItem);
- QQuickItemPrivate::implicitHeightChanged();
- emit q->implicitHeightChanged2();
-}
QQuickImplicitSizeItem::QQuickImplicitSizeItem(QQuickImplicitSizeItemPrivate &dd, QQuickItem *parent)
: QQuickItem(dd, parent)