summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-13 03:37:23 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-13 03:37:23 (GMT)
commita5563a8636b871def972f20083b11247caa6cb5a (patch)
tree032995af4d5182a521648dd7673216aec01ed1ae /src/declarative/graphicsitems
parentcd2187091e6b357c79f4e0db0a14f210df79f3fd (diff)
parent9e6960ed4ce172c61895b81aaaf541415e08dafd (diff)
downloadQt-a5563a8636b871def972f20083b11247caa6cb5a.zip
Qt-a5563a8636b871def972f20083b11247caa6cb5a.tar.gz
Qt-a5563a8636b871def972f20083b11247caa6cb5a.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors_p.h4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsborderimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsevents_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflickable_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsgridview.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase.cpp2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimagebase_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp66
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.h4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem_p.h6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsloader_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsparticles_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspath_p.h4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspathview_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners.cpp28
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspositioners_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrectangle_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsrepeater_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstext_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h2
-rw-r--r--src/declarative/graphicsitems/qmlgraphicswebview.cpp20
31 files changed, 103 insertions, 79 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index 655e03d..61b6ecc 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -43,7 +43,7 @@
#include "qmlgraphicsitem.h"
#include "qmlgraphicsitem_p.h"
#include <QDebug>
-#include <QtDeclarative/qmlinfo.h>
+#include <qmlinfo.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors_p.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
index f6e9e1a..bdddafe 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p.h
@@ -43,8 +43,8 @@
#define QMLGRAPHICSANCHORS_H
#include <QtCore/QObject>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qml.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
index 8c91056..97fdc6a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanimatedimage.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <QMovie>
-#include <QtDeclarative/qmlengine.h>
+#include <qmlengine.h>
#include "qmlgraphicsanimatedimage_p.h"
#include "qmlgraphicsanimatedimage_p_p.h"
#include <QNetworkRequest>
diff --git a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
index fba9d69..04e79f9 100644
--- a/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsborderimage.cpp
@@ -44,7 +44,7 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
-#include <QtDeclarative/qmlengine.h>
+#include <qmlengine.h>
QT_BEGIN_NAMESPACE
@@ -55,7 +55,7 @@ QML_DEFINE_TYPE(Qt,4,6,BorderImage,QmlGraphicsBorderImage)
\brief The BorderImage element provides an image that can be used as a border.
\inherits Item
- \snippet examples/declarative/border-image/example.qml 0
+ \snippet snippets/declarative/border-image.qml 0
\image BorderImage.png
diff --git a/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h b/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h
index 9cab18e..567a509 100644
--- a/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsevents_p_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <QtDeclarative/qml.h>
+#include <qml.h>
#include <QtCore/qobject.h>
#include <QtGui/qevent.h>
diff --git a/src/declarative/graphicsitems/qmlgraphicsflickable_p.h b/src/declarative/graphicsitems/qmlgraphicsflickable_p.h
index 08b0fd8..10447f6 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflickable_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflickable_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSFLICKABLE_H
#define QMLGRAPHICSFLICKABLE_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
index c61f996..57d2ee1 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
@@ -42,7 +42,7 @@
#include "qmlgraphicsflipable_p.h"
#include "private/qmlgraphicsitem_p.h"
#include "QtGui/qgraphicstransform.h"
-#include <QtDeclarative/qmlinfo.h>
+#include <qmlinfo.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable_p.h b/src/declarative/graphicsitems/qmlgraphicsflipable_p.h
index 23b6c76..8f075ac 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflipable_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable_p.h
@@ -44,7 +44,7 @@
#include <QtCore/QObject>
#include <QtGui/QTransform>
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
#include <QtGui/qvector3d.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h b/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h
index d014da2..d1824e7 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsfocuspanel_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSFOCUSPANEL_H
#define QMLGRAPHICSFOCUSPANEL_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h b/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h
index 813a999..3744240 100644
--- a/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsfocusscope_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSFOCUSSCOPE_H
#define QMLGRAPHICSFOCUSSCOPE_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h
index 10f08bd..7d16685 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsgraphicsobjectcontainer_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSGRAPHICSOBJECTCONTAINER_H
#define QMLGRAPHICSGRAPHICSOBJECTCONTAINER_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
index 1b94426..29eb983 100644
--- a/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsgridview.cpp
@@ -353,7 +353,7 @@ FxGridItem *QmlGraphicsGridViewPrivate::createItem(int modelIndex)
listItem->index = modelIndex;
// complete
model->completeItem();
- listItem->item->setZValue(modelIndex + 1);
+ listItem->item->setZValue(1);
listItem->item->setParent(q->viewport());
}
requestedIndex = 0;
diff --git a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
index e86b53d..0b57540 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase.cpp
@@ -44,7 +44,7 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
-#include <QtDeclarative/qmlengine.h>
+#include <qmlengine.h>
#include <private/qmlpixmapcache_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
index 0968d99..8144ce0 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsimagebase_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSIMAGEBASE_H
#define QMLGRAPHICSIMAGEBASE_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index aa5c4cb..ca45f62 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -51,7 +51,7 @@
#include <QtGui/qgraphicstransform.h>
#include <QtGui/qgraphicseffect.h>
-#include <QtDeclarative/qmlengine.h>
+#include <qmlengine.h>
#include <private/qmlopenmetaobject_p.h>
#include <private/qmlstate_p.h>
#include <private/qlistmodelinterface_p.h>
@@ -1325,6 +1325,24 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject
}
\endqml
+ \section1 Identity
+
+ Each item has an "id" - the identifier of the Item.
+
+ The identifier can be used in bindings and other expressions to
+ refer to the item. For example:
+
+ \qml
+ Text { id: myText; ... }
+ Text { text: myText.text }
+ \endqml
+
+ The identifier is available throughout to the \l {components}{component}
+ where it is declared. The identifier must be unique in the component.
+
+ The id should not be thought of as a "property" - it makes no sense
+ to write \c myText.id, for example.
+
\section1 Key Handling
Key handling is available to all Item-based visual elements via the \l {Keys}{Keys}
@@ -1510,6 +1528,14 @@ void QmlGraphicsItem::setParentItem(QmlGraphicsItem *parent)
}
/*!
+ \fn void QmlGraphicsItem::setParent(QmlGraphicsItem *parent)
+ \overload
+ Sets both the parent object and parent item to \a parent. This
+ function avoids the programming error of calling setParent()
+ when you mean setParentItem().
+*/
+
+/*!
Returns the QmlGraphicsItem parent of this item.
*/
QmlGraphicsItem *QmlGraphicsItem::parentItem() const
@@ -1994,22 +2020,6 @@ QVariant QmlGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const
}
/*!
- \qmlproperty string Item::id
- This property holds the identifier for the item.
-
- The identifier can be used in bindings and other expressions to
- refer to the item. For example:
-
- \qml
- Text { id: myText; ... }
- Text { text: myText.text }
- \endqml
-
- The identifier is available throughout to the \l {components}{component}
- where it is declared. The identifier must be unique in thecomponent.
-*/
-
-/*!
\internal
*/
QmlGraphicsAnchorLine QmlGraphicsItem::left() const
@@ -2357,7 +2367,7 @@ bool QmlGraphicsItem::keepMouseGrab() const
to steal a mouse grab if it detects that the user has begun to
move the viewport.
- \sa keepMouseGrab
+ \sa keepMouseGrab()
*/
void QmlGraphicsItem::setKeepMouseGrab(bool keep)
{
@@ -2801,12 +2811,19 @@ void QmlGraphicsItem::resetWidth()
setImplicitWidth(implicitWidth());
}
+/*!
+ Returns the width of the item that is implied by other properties that determine the content.
+*/
qreal QmlGraphicsItem::implicitWidth() const
{
Q_D(const QmlGraphicsItem);
return d->implicitWidth;
}
+/*!
+ Sets the implied width of the item to \a w.
+ This is the width implied by other properties that determine the content.
+*/
void QmlGraphicsItem::setImplicitWidth(qreal w)
{
Q_D(QmlGraphicsItem);
@@ -2824,6 +2841,9 @@ void QmlGraphicsItem::setImplicitWidth(qreal w)
QRectF(x(), y(), oldWidth, height()));
}
+/*!
+ Returns whether the width property has been set explicitly.
+*/
bool QmlGraphicsItem::widthValid() const
{
Q_D(const QmlGraphicsItem);
@@ -2860,12 +2880,19 @@ void QmlGraphicsItem::resetHeight()
setImplicitHeight(implicitHeight());
}
+/*!
+ Returns the height of the item that is implied by other properties that determine the content.
+*/
qreal QmlGraphicsItem::implicitHeight() const
{
Q_D(const QmlGraphicsItem);
return d->implicitHeight;
}
+/*!
+ Sets the implied height of the item to \a h.
+ This is the height implied by other properties that determine the content.
+*/
void QmlGraphicsItem::setImplicitHeight(qreal h)
{
Q_D(QmlGraphicsItem);
@@ -2883,6 +2910,9 @@ void QmlGraphicsItem::setImplicitHeight(qreal h)
QRectF(x(), y(), width(), oldHeight));
}
+/*!
+ Returns whether the height property has been set explicitly.
+*/
bool QmlGraphicsItem::heightValid() const
{
Q_D(const QmlGraphicsItem);
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h
index f64964c..2ac43b5 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.h
@@ -44,8 +44,8 @@
#include <QtCore/QObject>
#include <QtCore/QList>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlcomponent.h>
+#include <qml.h>
+#include <qmlcomponent.h>
#include <QtGui/qgraphicsitem.h>
#include <QtGui/qgraphicstransform.h>
#include <QtGui/qfont.h>
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem_p.h b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
index e1d7342..0c722ac 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
@@ -53,13 +53,13 @@
// We mean it.
//
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
#include <private/qmlstate_p.h>
#include <private/qmlgraphicsanchors_p.h>
#include <private/qmlnullablevalue_p_p.h>
#include <private/qmlgraphicsanchors_p_p.h>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlcontext.h>
+#include <qml.h>
+#include <qmlcontext.h>
#include <QtCore/qlist.h>
#include <private/qgraphicsitem_p.h>
#include <QtCore/qdebug.h>
diff --git a/src/declarative/graphicsitems/qmlgraphicsloader_p.h b/src/declarative/graphicsitems/qmlgraphicsloader_p.h
index ad516b4..bca65fa 100644
--- a/src/declarative/graphicsitems/qmlgraphicsloader_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsloader_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSLOADER_H
#define QMLGRAPHICSLOADER_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h
index 9c3398a..998183d 100644
--- a/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsmouseregion_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSMOUSEREGION_H
#define QMLGRAPHICSMOUSEREGION_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
index 8d629b3..0805330 100644
--- a/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSIMAGEITEM_H
#define QMLGRAPHICSIMAGEITEM_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsparticles_p.h b/src/declarative/graphicsitems/qmlgraphicsparticles_p.h
index 2554605..02c4e6d 100644
--- a/src/declarative/graphicsitems/qmlgraphicsparticles_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsparticles_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSPARTICLES_H
#define QMLGRAPHICSPARTICLES_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicspath_p.h b/src/declarative/graphicsitems/qmlgraphicspath_p.h
index 8abfb2a..4b0c772 100644
--- a/src/declarative/graphicsitems/qmlgraphicspath_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspath_p.h
@@ -44,8 +44,8 @@
#include <QtCore/QObject>
#include <QtGui/QPainterPath>
-#include <QtDeclarative/qml.h>
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qml.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicspathview_p.h b/src/declarative/graphicsitems/qmlgraphicspathview_p.h
index 59118d4..38f1cd8 100644
--- a/src/declarative/graphicsitems/qmlgraphicspathview_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspathview_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSPATHVIEW_H
#define QMLGRAPHICSPATHVIEW_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
#include <private/qmlgraphicspath_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
index ced9d55..65e63eb 100644
--- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp
@@ -70,15 +70,18 @@ void QmlGraphicsBasePositionerPrivate::watchChanges(QmlGraphicsItem *other)
void QmlGraphicsBasePositionerPrivate::unwatchChanges(QmlGraphicsItem* other)
{
Q_Q(QmlGraphicsBasePositioner);
- QObject::disconnect(other, SIGNAL(visibleChanged()),
+ bool stillAlive = false; //Use the return from disconnect to see if it was deleted or just reparented
+ stillAlive |= QObject::disconnect(other, SIGNAL(visibleChanged()),
q, SLOT(prePositioning()));
- QObject::disconnect(other, SIGNAL(opacityChanged()),
+ stillAlive |= QObject::disconnect(other, SIGNAL(opacityChanged()),
q, SLOT(prePositioning()));
- QObject::disconnect(other, SIGNAL(heightChanged()),
+ stillAlive |= QObject::disconnect(other, SIGNAL(heightChanged()),
q, SLOT(prePositioning()));
- QObject::disconnect(other, SIGNAL(widthChanged()),
+ stillAlive |= QObject::disconnect(other, SIGNAL(widthChanged()),
q, SLOT(prePositioning()));
- static_cast<QmlGraphicsItemPrivate*>(QGraphicsItemPrivate::get(other))->unregisterSiblingOrderNotification(this);
+ if(stillAlive)
+ static_cast<QmlGraphicsItemPrivate*>(QGraphicsItemPrivate::get(other))
+ ->unregisterSiblingOrderNotification(this);
watched.removeAll(other);
}
@@ -266,18 +269,9 @@ void QmlGraphicsBasePositioner::prePositioning()
positionedItems << child;
}
QSet<QmlGraphicsItem *> deletedItems = d->_items - allItems;
- foreach(QmlGraphicsItem *child, d->_items){
- if (!allItems.contains(child)){
- if (!deletedItems.contains(child)) {
- QObject::disconnect(child, SIGNAL(opacityChanged()),
- this, SLOT(prePositioning()));
- QObject::disconnect(child, SIGNAL(heightChanged()),
- this, SLOT(prePositioning()));
- QObject::disconnect(child, SIGNAL(widthChanged()),
- this, SLOT(prePositioning()));
- }
- d->_items -= child;
- }
+ foreach(QmlGraphicsItem *child, deletedItems){
+ d->unwatchChanges(child);
+ d->_items -= child;
}
d->_animated.clear();
doPositioning();
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners_p.h b/src/declarative/graphicsitems/qmlgraphicspositioners_p.h
index 56adc8b..a0665ae 100644
--- a/src/declarative/graphicsitems/qmlgraphicspositioners_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicspositioners_p.h
@@ -44,7 +44,7 @@
#include <QtCore/QObject>
#include <QtCore/QString>
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
#include <private/qmlstate_p.h>
diff --git a/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
index 2f0a518..fe8c403 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrectangle_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSRECT_H
#define QMLGRAPHICSRECT_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
#include <QtGui/qbrush.h>
diff --git a/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h b/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h
index 4058df0..c5d0166 100644
--- a/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsrepeater_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSREPEATER_H
#define QMLGRAPHICSREPEATER_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h b/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h
index d4ae0a6..82e0a94 100644
--- a/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsscalegrid_p_p.h
@@ -45,7 +45,7 @@
#include <QtCore/QString>
#include <QtCore/QObject>
#include <private/qmlpixmapcache_p.h>
-#include <QtDeclarative/qml.h>
+#include <qml.h>
#include "qmlgraphicsborderimage_p.h"
diff --git a/src/declarative/graphicsitems/qmlgraphicstext_p.h b/src/declarative/graphicsitems/qmlgraphicstext_p.h
index 31b049a..b6a5932 100644
--- a/src/declarative/graphicsitems/qmlgraphicstext_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicstext_p.h
@@ -42,7 +42,7 @@
#ifndef QMLGRAPHICSTEXT_H
#define QMLGRAPHICSTEXT_H
-#include <QtDeclarative/qmlgraphicsitem.h>
+#include <qmlgraphicsitem.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
index 3ff2a74..9855867 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel_p.h
@@ -44,7 +44,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qabstractitemmodel.h>
-#include <QtDeclarative/qml.h>
+#include <qml.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/graphicsitems/qmlgraphicswebview.cpp b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
index 14c4352..6dbf053 100644
--- a/src/declarative/graphicsitems/qmlgraphicswebview.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicswebview.cpp
@@ -309,7 +309,8 @@ QmlGraphicsWebView::Status QmlGraphicsWebView::status() const
\qmlproperty real WebView::progress
This property holds the progress of loading the current URL, from 0 to 1.
- \sa onLoadFinished() onLoadFailed()
+ If you just want to know when progress gets to 1, use
+ WebView::onLoadFinished() or WebView::onLoadFailed() instead.
*/
qreal QmlGraphicsWebView::progress() const
{
@@ -1057,27 +1058,26 @@ void QmlGraphicsWebView::setPage(QWebPage *page)
\qmlsignal WebView::onLoadStarted()
This handler is called when the web engine begins loading
- a page.
-
- \sa progress onLoadFinished() onLoadFailed()
+ a page. Later, WebView::onLoadFinished() or WebView::onLoadFailed()
+ will be emitted.
*/
/*!
\qmlsignal WebView::onLoadFinished()
- This handler is called when the web engine finishes loading
- a page, including any component content.
+ This handler is called when the web engine \e successfully
+ finishes loading a page, including any component content
+ (WebView::onLoadFailed() will be emitted otherwise).
- \sa progress onLoadFailed()
+ \sa progress
*/
/*!
\qmlsignal WebView::onLoadFailed()
This handler is called when the web engine fails loading
- a page or any component content.
-
- \sa progress onLoadFinished()
+ a page or any component content
+ (WebView::onLoadFinished() will be emitted on success).
*/
void QmlGraphicsWebView::load(const QNetworkRequest &request,