summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable_p_p.h1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocuspanel.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativefocusscope.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp19
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview_p.h12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp13
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp12
-rw-r--r--src/declarative/graphicsitems/qdeclarativelayoutitem.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h12
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp58
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp18
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp21
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp26
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp17
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h1
-rw-r--r--src/declarative/qml/qdeclarativecompiledbindings.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp27
-rw-r--r--src/declarative/qml/qdeclarativecompositetypemanager.cpp18
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeimport.cpp157
-rw-r--r--src/declarative/qml/qdeclarativeimport_p.h37
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h7
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp54
-rw-r--r--src/declarative/util/qdeclarativebind.cpp15
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp7
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp3
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp6
-rw-r--r--src/declarative/util/qdeclarativestate.cpp17
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp6
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp7
45 files changed, 192 insertions, 527 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
index 7ac2b17..26fb97f 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp
@@ -148,15 +148,6 @@ static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::Anc
return ret;
}
-/*!
- \internal
- \class QDeclarativeAnchors
- \since 4.7
- \brief The QDeclarativeAnchors class provides a way to lay out items relative to other items.
-
- \warning Currently, only anchoring to siblings or parent is supported.
-*/
-
QDeclarativeAnchors::QDeclarativeAnchors(QObject *parent)
: QObject(*new QDeclarativeAnchorsPrivate(0), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
index e0a2149..a95e944 100644
--- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp
@@ -54,11 +54,6 @@
QT_BEGIN_NAMESPACE
/*!
- \class QDeclarativeAnimatedImage
- \internal
-*/
-
-/*!
\qmlclass AnimatedImage QDeclarativeAnimatedImage
\inherits Image
\since 4.7
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index e0c7fc2..f16770b 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -79,12 +79,6 @@ QT_BEGIN_NAMESPACE
rectangular item.
*/
-/*!
- \class QDeclarativeBorderImage BorderImage
- \internal
- \brief The QDeclarativeBorderImage class provides an image item that you can add to a QDeclarativeView.
-*/
-
QDeclarativeBorderImage::QDeclarativeBorderImage(QDeclarativeItem *parent)
: QDeclarativeImageBase(*(new QDeclarativeBorderImagePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index 0a35a3f..dbfb3fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -60,11 +60,6 @@ Item {
*/
/*!
- \internal
- \class QDeclarativeKeyEvent
-*/
-
-/*!
\qmlproperty int KeyEvent::key
This property holds the code of the key that was pressed or released.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index a6e8c85..a710190 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -653,6 +653,8 @@ void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEven
timeline.clear();
hData.velocity = 0;
vData.velocity = 0;
+ hData.dragStartOffset = 0;
+ vData.dragStartOffset = 0;
lastPos = QPoint();
QDeclarativeItemPrivate::start(lastPosTime);
pressPos = event->pos();
@@ -675,7 +677,9 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (q->yflick()) {
int dy = int(event->pos().y() - pressPos.y());
if (qAbs(dy) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
- qreal newY = dy + vData.pressPos;
+ if (!vMoved)
+ vData.dragStartOffset = dy;
+ qreal newY = dy + vData.pressPos - vData.dragStartOffset;
const qreal minY = q->minYExtent();
const qreal maxY = q->maxYExtent();
if (newY > minY)
@@ -705,7 +709,9 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (q->xflick()) {
int dx = int(event->pos().x() - pressPos.x());
if (qAbs(dx) > QApplication::startDragDistance() || QDeclarativeItemPrivate::elapsed(pressTime) > 200) {
- qreal newX = dx + hData.pressPos;
+ if (!hMoved)
+ hData.dragStartOffset = dx;
+ qreal newX = dx + hData.pressPos - hData.dragStartOffset;
const qreal minX = q->minXExtent();
const qreal maxX = q->maxXExtent();
if (newX > minX)
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
index b919e1b..c398faa 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h
@@ -96,6 +96,7 @@ public:
QDeclarativeTimeLineValueProxy<QDeclarativeFlickablePrivate> move;
qreal viewSize;
qreal pressPos;
+ qreal dragStartOffset;
qreal velocity;
qreal flickTarget;
QDeclarativeFlickablePrivate::Velocity smoothVelocity;
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 6ce0fa6..69dd66a 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -99,15 +99,6 @@ public:
\sa {declarative/ui-components/flipable}{Flipable example}
*/
-/*!
- \internal
- \class QDeclarativeFlipable
- \brief The Flipable item provides a surface that can be flipped.
-
- Flipable is an item that can be visibly "flipped" between its front and
- back sides.
-*/
-
QDeclarativeFlipable::QDeclarativeFlipable(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeFlipablePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
index 5c7959a..f345a14 100644
--- a/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativefocuspanel.cpp
@@ -61,11 +61,6 @@ QT_BEGIN_NAMESPACE
\l {qmlfocus}{keyboard focus documentation}.
*/
-/*!
- \internal
- \class QDeclarativeFocusPanel
-*/
-
QDeclarativeFocusPanel::QDeclarativeFocusPanel(QDeclarativeItem *parent) :
QDeclarativeItem(parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
index 4498275..da97a46 100644
--- a/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
+++ b/src/declarative/graphicsitems/qdeclarativefocusscope.cpp
@@ -60,11 +60,6 @@ QT_BEGIN_NAMESPACE
\sa {declarative/keyinteraction/focus}{Keyboard focus example}
*/
-/*!
- \internal
- \class QDeclarativeFocusScope
-*/
-
QDeclarativeFocusScope::QDeclarativeFocusScope(QDeclarativeItem *parent) :
QDeclarativeItem(parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
index ee45406..d45fe83 100644
--- a/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
@@ -68,7 +68,6 @@ QDeclarativeGraphicsWidget::~QDeclarativeGraphicsWidget()
delete d->_anchors; d->_anchors = 0;
}
-/*! \internal */
QDeclarativeAnchors *QDeclarativeGraphicsWidget::anchors()
{
Q_D(QDeclarativeGraphicsWidget);
@@ -85,54 +84,36 @@ QDeclarativeItemPrivate::AnchorLines *QDeclarativeGraphicsWidgetPrivate::anchorL
return _anchorLines;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::left() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->left;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::right() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->right;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::horizontalCenter() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->hCenter;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::top() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->top;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::bottom() const
{
Q_D(const QDeclarativeGraphicsWidget);
return d->anchorLines()->bottom;
}
-/*!
- \internal
-*/
QDeclarativeAnchorLine QDeclarativeGraphicsWidget::verticalCenter() const
{
Q_D(const QDeclarativeGraphicsWidget);
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index d67e69a..a0faf14 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -64,7 +64,7 @@ public:
FxGridItem(QDeclarativeItem *i, QDeclarativeGridView *v) : item(i), view(v) {
attached = static_cast<QDeclarativeGridViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeGridView>(item));
if (attached)
- attached->m_view = view;
+ attached->setView(view);
}
~FxGridItem() {}
@@ -2212,7 +2212,7 @@ void QDeclarativeGridView::trackedPositionChanged()
if (trackedPos < d->startPosition() + d->highlightRangeStart) {
pos = d->startPosition();
} else if (d->trackedItem->endRowPos() > d->endPosition() - d->size() + d->highlightRangeEnd) {
- pos = d->endPosition() - d->size();
+ pos = d->endPosition() - d->size() + 1;
if (pos < d->startPosition())
pos = d->startPosition();
} else {
@@ -2226,14 +2226,14 @@ void QDeclarativeGridView::trackedPositionChanged()
} else {
if (trackedPos < viewPos && d->currentItem->rowPos() < viewPos) {
pos = d->currentItem->rowPos() < trackedPos ? trackedPos : d->currentItem->rowPos();
- } else if (d->trackedItem->endRowPos() > viewPos + d->size()
- && d->currentItem->endRowPos() > viewPos + d->size()) {
- if (d->trackedItem->endRowPos() < d->currentItem->endRowPos()) {
- pos = d->trackedItem->endRowPos() - d->size();
+ } else if (d->trackedItem->endRowPos() >= viewPos + d->size()
+ && d->currentItem->endRowPos() >= viewPos + d->size()) {
+ if (d->trackedItem->endRowPos() <= d->currentItem->endRowPos()) {
+ pos = d->trackedItem->endRowPos() - d->size() + 1;
if (d->rowSize() > d->size())
pos = trackedPos;
} else {
- pos = d->currentItem->endRowPos() - d->size();
+ pos = d->currentItem->endRowPos() - d->size() + 1;
if (d->rowSize() > d->size())
pos = d->currentItem->rowPos();
}
diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h
index d6bbaf3..ee632b1 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h
@@ -43,6 +43,7 @@
#define QDECLARATIVEGRIDVIEW_H
#include "private/qdeclarativeflickable_p.h"
+#include "private/qdeclarativeguard_p.h"
QT_BEGIN_HEADER
@@ -220,8 +221,14 @@ public:
: QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
~QDeclarativeGridViewAttached() {}
- Q_PROPERTY(QDeclarativeGridView *view READ view CONSTANT)
+ Q_PROPERTY(QDeclarativeGridView *view READ view NOTIFY viewChanged)
QDeclarativeGridView *view() { return m_view; }
+ void setView(QDeclarativeGridView *view) {
+ if (view != m_view) {
+ m_view = view;
+ emit viewChanged();
+ }
+ }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -249,9 +256,10 @@ Q_SIGNALS:
void delayRemoveChanged();
void add();
void remove();
+ void viewChanged();
public:
- QDeclarativeGridView *m_view;
+ QDeclarativeGuard<QDeclarativeGridView> m_view;
bool m_isCurrent : 1;
bool m_delayRemove : 1;
};
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 1cc5f81..7a88e78 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -91,19 +91,6 @@ QT_BEGIN_NAMESPACE
\sa {declarative/imageelements/image}{Image example}, QDeclarativeImageProvider
*/
-/*!
- \internal
- \class QDeclarativeImage Image
- \brief The QDeclarativeImage class provides an image item that you can add to a QDeclarativeView.
-
- Example:
- \qml
- Image { source: "pics/star.png" }
- \endqml
-
- A QDeclarativeImage object can be instantiated in QML using the tag \l Image.
-*/
-
QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent)
: QDeclarativeImageBase(*(new QDeclarativeImagePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index d6b935b..416604b 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -50,13 +50,6 @@
QT_BEGIN_NAMESPACE
-
-/*!
- \class QDeclarativeImageBase
- \internal
- \brief The base class for declarative images.
- */
-
QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
: QDeclarativeItem(dd, parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 0f16a79..1054898 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -229,12 +229,6 @@ QT_BEGIN_NAMESPACE
The angle to rotate, in degrees clockwise.
*/
-/*!
- \internal
- \class QDeclarativeContents
- \brief The QDeclarativeContents class gives access to the height and width of an item's contents.
-
-*/
QDeclarativeContents::QDeclarativeContents(QDeclarativeItem *item) : m_item(item), m_x(0), m_y(0), m_width(0), m_height(0)
{
//### optimize
@@ -1728,7 +1722,6 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN
specify it.
*/
-/*! \internal */
QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::data()
{
return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::data_append);
@@ -2416,7 +2409,6 @@ void QDeclarativeItemPrivate::focusChanged(bool flag)
emit q->focusChanged(flag);
}
-/*! \internal */
QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources()
{
return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::resources_append,
@@ -2441,7 +2433,6 @@ QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources()
\sa {qmlstate}{States}
*/
-/*! \internal */
QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
{
return _states()->statesProperty();
@@ -2465,7 +2456,6 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
*/
-/*! \internal */
QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transitions()
{
return _states()->transitionsProperty();
@@ -2538,7 +2528,6 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\sa {qmlstates}{States}
*/
-/*! \internal */
QString QDeclarativeItemPrivate::state() const
{
if (!_stateGroup)
@@ -2547,7 +2536,6 @@ QString QDeclarativeItemPrivate::state() const
return _stateGroup->state();
}
-/*! \internal */
void QDeclarativeItemPrivate::setState(const QString &state)
{
_states()->setState(state);
diff --git a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
index 8509473..d71b2c5 100644
--- a/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelayoutitem.cpp
@@ -66,13 +66,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativeLayoutItem
- \brief The QDeclarativeLayoutItem class allows you to place your QML UI elements inside Qt's Graphics View layouts.
-*/
-
-
-/*!
\qmlproperty QSizeF LayoutItem::maximumSize
The maximumSize property can be set to specify the maximum desired size of this LayoutItem
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 2e2e08c..d3d46f7 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -96,7 +96,7 @@ public:
FxListItem(QDeclarativeItem *i, QDeclarativeListView *v) : item(i), section(0), view(v) {
attached = static_cast<QDeclarativeListViewAttached*>(qmlAttachedPropertiesObject<QDeclarativeListView>(item));
if (attached)
- attached->m_view = view;
+ attached->setView(view);
}
~FxListItem() {}
qreal position() const {
@@ -2652,7 +2652,7 @@ void QDeclarativeListView::trackedPositionChanged()
if (trackedPos < d->startPosition() + d->highlightRangeStart) {
pos = d->startPosition();
} else if (d->trackedItem->endPosition() > d->endPosition() - d->size() + d->highlightRangeEnd) {
- pos = d->endPosition() - d->size();
+ pos = d->endPosition() - d->size() + 1;
if (pos < d->startPosition())
pos = d->startPosition();
} else {
@@ -2666,14 +2666,14 @@ void QDeclarativeListView::trackedPositionChanged()
} else {
if (trackedPos < viewPos && d->currentItem->position() < viewPos) {
pos = d->currentItem->position() < trackedPos ? trackedPos : d->currentItem->position();
- } else if (d->trackedItem->endPosition() > viewPos + d->size()
- && d->currentItem->endPosition() > viewPos + d->size()) {
- if (d->trackedItem->endPosition() < d->currentItem->endPosition()) {
- pos = d->trackedItem->endPosition() - d->size();
- if (d->trackedItem->size() > d->size())
+ } else if (d->trackedItem->endPosition() >= viewPos + d->size()
+ && d->currentItem->endPosition() >= viewPos + d->size()) {
+ if (d->trackedItem->endPosition() <= d->currentItem->endPosition()) {
+ pos = d->trackedItem->endPosition() - d->size() + 1;
+ if (d->trackedItem->size() > d->size())
pos = trackedPos;
} else {
- pos = d->currentItem->endPosition() - d->size();
+ pos = d->currentItem->endPosition() - d->size() + 1;
if (d->currentItem->size() > d->size())
pos = d->currentItem->position();
}
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index b264861..8fbff49 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -43,6 +43,7 @@
#define QDECLARATIVELISTVIEW_H
#include "private/qdeclarativeflickable_p.h"
+#include "private/qdeclarativeguard_p.h"
QT_BEGIN_HEADER
@@ -268,8 +269,14 @@ public:
: QObject(parent), m_view(0), m_isCurrent(false), m_delayRemove(false) {}
~QDeclarativeListViewAttached() {}
- Q_PROPERTY(QDeclarativeListView *view READ view CONSTANT)
+ Q_PROPERTY(QDeclarativeListView *view READ view NOTIFY viewChanged)
QDeclarativeListView *view() { return m_view; }
+ void setView(QDeclarativeListView *view) {
+ if (view != m_view) {
+ m_view = view;
+ emit viewChanged();
+ }
+ }
Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged)
bool isCurrentItem() const { return m_isCurrent; }
@@ -327,9 +334,10 @@ Q_SIGNALS:
void delayRemoveChanged();
void add();
void remove();
+ void viewChanged();
public:
- QDeclarativeListView *m_view;
+ QDeclarativeGuard<QDeclarativeListView> m_view;
mutable QString m_section;
QString m_prevSection;
QString m_nextSection;
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 2fde4c8..5d71625 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -189,14 +189,6 @@ void QDeclarativeLoaderPrivate::initResize()
\sa {dynamic-object-creation}{Dynamic Object Creation}
*/
-/*!
- \internal
- \class QDeclarativeLoader
- */
-
-/*!
- Create a new QDeclarativeLoader instance.
- */
QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeLoaderPrivate), parent)
{
@@ -204,9 +196,6 @@ QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
d->flags |= QGraphicsItem::ItemIsFocusScope;
}
-/*!
- Destroy the loader instance.
- */
QDeclarativeLoader::~QDeclarativeLoader()
{
Q_D(QDeclarativeLoader);
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index 2823888..ec01549 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -317,16 +317,6 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
\l Flickable, \c onCanceled should be used in addition to onReleased.
*/
-/*!
- \internal
- \class QDeclarativeMouseArea
- \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within QML.
-
- All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse
- handling data as properties and tracks flicking and dragging of the mouse.
-
- A QDeclarativeMouseArea object can be instantiated in QML using the tag \l MouseArea.
- */
QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeMouseAreaPrivate), parent)
{
@@ -690,7 +680,6 @@ void QDeclarativeMouseArea::geometryChanged(const QRectF &newGeometry,
d->lastPos = mapFromScene(d->lastScenePos);
}
-/*! \internal */
QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change,
const QVariant &value)
{
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index 0c069ce..f93357d 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -62,11 +62,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativePathElement
-*/
-
-/*!
\qmlclass Path QDeclarativePath
\ingroup qml-view-elements
\since 4.7
@@ -83,13 +78,6 @@ QT_BEGIN_NAMESPACE
\sa PathView, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic
*/
-
-/*!
- \internal
- \class QDeclarativePath
- \brief The QDeclarativePath class defines a path.
- \sa QDeclarativePathView
-*/
QDeclarativePath::QDeclarativePath(QObject *parent)
: QObject(*(new QDeclarativePathPrivate), parent)
{
@@ -527,15 +515,6 @@ void QDeclarativeCurve::setY(qreal y)
*/
/*!
- \internal
- \class QDeclarativePathAttribute
- \brief The QDeclarativePathAttribute class allows to set the value of an attribute at a given position in the path.
-
- \sa QDeclarativePath
-*/
-
-
-/*!
\qmlproperty string PathAttribute::name
the name of the attribute to change.
@@ -608,14 +587,6 @@ void QDeclarativePathAttribute::setValue(qreal value)
*/
/*!
- \internal
- \class QDeclarativePathLine
- \brief The QDeclarativePathLine class defines a straight line.
-
- \sa QDeclarativePath
-*/
-
-/*!
\qmlproperty real PathLine::x
\qmlproperty real PathLine::y
@@ -652,15 +623,6 @@ void QDeclarativePathLine::addToPath(QPainterPath &path)
*/
/*!
- \internal
- \class QDeclarativePathQuad
- \brief The QDeclarativePathQuad class defines a quadratic Bezier curve with a control point.
-
- \sa QDeclarativePath
-*/
-
-
-/*!
\qmlproperty real PathQuad::x
\qmlproperty real PathQuad::y
@@ -743,14 +705,6 @@ void QDeclarativePathQuad::addToPath(QPainterPath &path)
*/
/*!
- \internal
- \class QDeclarativePathCubic
- \brief The QDeclarativePathCubic class defines a cubic Bezier curve with two control points.
-
- \sa QDeclarativePath
-*/
-
-/*!
\qmlproperty real PathCubic::x
\qmlproperty real PathCubic::y
@@ -872,18 +826,6 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\sa Path
*/
-/*!
- \internal
- \class QDeclarativePathPercent
- \brief The QDeclarativePathPercent class manipulates the way a path is interpreted.
-
- QDeclarativePathPercent allows you to bunch up items (or spread out items) along various
- segments of a QDeclarativePathView's path.
-
- \sa QDeclarativePath
-
-*/
-
qreal QDeclarativePathPercent::value() const
{
return _value;
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 4ceb5d9..b776b8e 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -108,8 +108,7 @@ void QDeclarativeBasePositioner::graphicsWidgetGeometryChanged()
You also need to set a PositionerType, to declare whether you are positioning the x, y or both
for the child items. Depending on the chosen type, only x or y changes will be applied.
- Note that the subclass is responsible for adding the
- spacing in between items.
+ Note that the subclass is responsible for adding the spacing in between items.
*/
QDeclarativeBasePositioner::QDeclarativeBasePositioner(PositionerType at, QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeBasePositionerPrivate), parent)
@@ -439,11 +438,6 @@ Column {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeColumn
- \brief The QDeclarativeColumn class lines up items vertically.
-*/
QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Vertical, parent)
{
@@ -579,11 +573,6 @@ Row {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeRow
- \brief The QDeclarativeRow class lines up items horizontally.
-*/
QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent)
: QDeclarativeBasePositioner(Horizontal, parent)
{
@@ -736,11 +725,6 @@ Grid {
\image spacing_b.png
*/
-/*!
- \internal
- \class QDeclarativeGrid
- \brief The QDeclarativeGrid class lays out items in a grid.
-*/
QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) :
QDeclarativeBasePositioner(Both, parent), m_rows(-1), m_columns(-1), m_flow(LeftToRight)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 5990c2d..d027924 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -180,11 +180,6 @@ void QDeclarativeGradient::doUpdate()
int QDeclarativeRectanglePrivate::doUpdateSlotIdx = -1;
-/*!
- \internal
- \class QDeclarativeRectangle
- \brief The QDeclarativeRectangle class provides a rectangle item that you can add to a QDeclarativeView.
-*/
QDeclarativeRectangle::QDeclarativeRectangle(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeRectanglePrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 4a951a2..97cf05c 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -146,23 +146,11 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
\endcode
*/
-/*!
- \internal
- \class QDeclarativeRepeater
- */
-
-/*!
- Create a new QDeclarativeRepeater instance.
- */
QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent)
{
}
-/*!
- Destroy the repeater instance. All items it instantiated are also
- destroyed.
- */
QDeclarativeRepeater::~QDeclarativeRepeater()
{
}
@@ -301,18 +289,12 @@ int QDeclarativeRepeater::count() const
}
-/*!
- \internal
- */
void QDeclarativeRepeater::componentComplete()
{
QDeclarativeItem::componentComplete();
regenerate();
}
-/*!
- \internal
- */
QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change,
const QVariant &value)
{
@@ -335,9 +317,6 @@ void QDeclarativeRepeater::clear()
d->deletables.clear();
}
-/*!
- \internal
- */
void QDeclarativeRepeater::regenerate()
{
Q_D(QDeclarativeRepeater);
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index e5ad743..f16af88 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -190,32 +190,6 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
\sa {declarative/text/fonts}{Fonts example}
*/
-
-/*!
- \internal
- \class QDeclarativeText
- \qmlclass Text
-
- \brief The QDeclarativeText class provides a formatted text item that you can add to a QDeclarativeView.
-
- Text was designed for read-only text; it does not allow for any text editing.
- It can display both plain and rich text. For example:
-
- \qml
- Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
- Text { text: "<b>Hello</b> <i>World!</i>" }
- \endqml
-
- \image text.png
-
- If height and width are not explicitly set, Text will attempt to determine how
- much room is needed and set it accordingly. Unless \c wrapMode is set, it will always
- prefer width to height (all text will be placed on a single line).
-
- The \c elide property can alternatively be used to fit a line of plain text to a set width.
-
- A QDeclarativeText object can be instantiated in QML using the tag \c Text.
-*/
QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index b8e8726..b1c0fcd 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -103,23 +103,6 @@ TextEdit {
\sa Text, TextInput, {declarative/text/textselection}{Text Selection example}
*/
-/*!
- \internal
- \class QDeclarativeTextEdit
- \qmlclass TextEdit
-
- \brief The QDeclarativeTextEdit class provides an editable formatted text item that you can add to a QDeclarativeView.
-
- It can display both plain and rich text.
-
- \image declarative-textedit.png
-
- A QDeclarativeTextEdit object can be instantiated in QML using the tag \c &lt;TextEdit&gt;.
-*/
-
-/*!
- Constructs a new QDeclarativeTextEdit.
-*/
QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent)
: QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index b4f36f4..5604b82 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -437,8 +437,6 @@ void QDeclarativeTextInput::setCursorPosition(int cp)
}
/*!
- \internal
-
Returns a Rect which encompasses the cursor, but which may be larger than is
required. Ignores custom cursor delegates.
*/
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate.cpp b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
index 0bae0cd..2e0af2a 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
@@ -116,9 +116,6 @@ void QDeclarativeTranslate::setY(qreal y)
emit yChanged();
}
-/*!
- \internal
-*/
void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
{
Q_D(const QDeclarativeTranslate);
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 65b14cf..b4e8bda 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -714,6 +714,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::disconnect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::disconnect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::disconnect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_abstractItemModel = 0;
} else if (d->m_visualItemModel) {
QObject::disconnect(d->m_visualItemModel, SIGNAL(itemsInserted(int,int)),
@@ -761,6 +762,7 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
QObject::connect(d->m_abstractItemModel, SIGNAL(rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)),
this, SLOT(_q_rowsMoved(const QModelIndex&,int,int,const QModelIndex&,int)));
QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset()));
+ QObject::connect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->m_metaDataCacheable = true;
return;
}
@@ -1332,6 +1334,12 @@ void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const
_q_itemsChanged(begin.row(), end.row() - begin.row() + 1, d->m_roles);
}
+void QDeclarativeVisualDataModel::_q_layoutChanged()
+{
+ Q_D(QDeclarativeVisualDataModel);
+ _q_itemsChanged(0, count(), d->m_roles);
+}
+
void QDeclarativeVisualDataModel::_q_modelReset()
{
emit modelReset();
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
index 50d2c53..e159786 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h
@@ -194,6 +194,7 @@ private Q_SLOTS:
void _q_rowsRemoved(const QModelIndex &,int,int);
void _q_rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int);
void _q_dataChanged(const QModelIndex&,const QModelIndex&);
+ void _q_layoutChanged();
void _q_modelReset();
void _q_createdPackage(int index, QDeclarativePackage *package);
void _q_destroyingPackage(QDeclarativePackage *package);
diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp
index 723da94..9402596 100644
--- a/src/declarative/qml/qdeclarativecompiledbindings.cpp
+++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp
@@ -1874,7 +1874,7 @@ bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type
return false;
QDeclarativeImportedNamespace *ns = 0;
- if (!engine->importDatabase.resolveType(imports, name.toUtf8(), &attachType, 0, 0, 0, &ns))
+ if (!imports.resolveType(name.toUtf8(), &attachType, 0, 0, 0, &ns))
return false;
if (ns || !attachType || !attachType->attachedPropertiesType())
return false;
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 2b4a4a5..f044e1a 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -668,13 +668,14 @@ void QDeclarativeCompiler::compileTree(Object *tree)
QString scriptCode = QString::fromUtf8(unit->scripts.at(ii).resource->data);
Object::ScriptBlock::Pragmas pragmas = QDeclarativeScriptParser::extractPragmas(scriptCode);
+ Q_ASSERT(!importedScripts.contains(unit->scripts.at(ii).qualifier));
+
if (!scriptCode.isEmpty()) {
Object::ScriptBlock &scriptBlock = importedScripts[unit->scripts.at(ii).qualifier];
- scriptBlock.codes.append(scriptCode);
- scriptBlock.lineNumbers.append(1);
- scriptBlock.files.append(unit->scripts.at(ii).resource->url);
- scriptBlock.pragmas.append(pragmas);
+ scriptBlock.code = scriptCode;
+ scriptBlock.file = unit->scripts.at(ii).resource->url;
+ scriptBlock.pragmas = pragmas;
}
}
@@ -703,7 +704,7 @@ void QDeclarativeCompiler::compileTree(Object *tree)
for (int ii = 0; ii < importedScriptIndexes.count(); ++ii)
output->importCache->add(importedScriptIndexes.at(ii), ii);
- unit->imports.cache(output->importCache, engine);
+ unit->imports.populateCache(output->importCache, engine);
Q_ASSERT(tree->metatype);
@@ -1403,8 +1404,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
QDeclarativeType *type = 0;
QDeclarativeImportedNamespace *typeNamespace = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, prop->name,
- &type, 0, 0, 0, &typeNamespace);
+ unit->imports.resolveType(prop->name, &type, 0, 0, 0, &typeNamespace);
if (typeNamespace) {
// ### We might need to indicate that this property is a namespace
@@ -1512,7 +1512,7 @@ bool QDeclarativeCompiler::buildPropertyInNamespace(QDeclarativeImportedNamespac
// Setup attached property data
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveTypeInNamespace(ns, prop->name, &type, 0, 0, 0);
+ unit->imports.resolveType(ns, prop->name, &type, 0, 0, 0);
if (!type || !type->attachedPropertiesType())
COMPILE_EXCEPTION(prop, tr("Non-existent attached object"));
@@ -2139,8 +2139,7 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(const QMetaProperty &prop
QString typeName = parts.at(0);
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, typeName.toUtf8(),
- &type, 0, 0, 0, 0);
+ unit->imports.resolveType(typeName.toUtf8(), &type, 0, 0, 0, 0);
if (!type || obj->typeName != type->qmlTypeName())
return true;
@@ -2167,7 +2166,7 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const
int dot = script.indexOf('.');
if (dot > 0) {
QDeclarativeType *type = 0;
- enginePrivate->importDatabase.resolveType(unit->imports, script.left(dot), &type, 0, 0, 0, 0);
+ unit->imports.resolveType(script.left(dot), &type, 0, 0, 0, 0);
if (!type)
return -1;
const QMetaObject *mo = type->metaObject();
@@ -2185,8 +2184,7 @@ int QDeclarativeCompiler::evaluateEnum(const QByteArray& script) const
const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) const
{
QDeclarativeType *qmltype = 0;
- if (!enginePrivate->importDatabase.resolveType(unit->imports, name, &qmltype,
- 0, 0, 0, 0))
+ if (!unit->imports.resolveType(name, &qmltype, 0, 0, 0, 0))
return 0;
if (!qmltype)
return 0;
@@ -2344,8 +2342,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
QByteArray customTypeName;
QDeclarativeType *qmltype = 0;
QUrl url;
- if (!enginePrivate->importDatabase.resolveType(unit->imports, p.customType, &qmltype,
- &url, 0, 0, 0))
+ if (!unit->imports.resolveType(p.customType, &qmltype, &url, 0, 0, 0))
COMPILE_EXCEPTION(&p, tr("Invalid property type"));
if (!qmltype) {
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
index 2e77534..cc8f887 100644
--- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp
+++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp
@@ -523,7 +523,7 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
int waiting = 0;
QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine);
- QDeclarativeImportDatabase &importDatabase = ep->importDatabase;
+ QDeclarativeImportDatabase *importDatabase = &ep->importDatabase;
// For local urls, add an implicit import "." as first (most overridden) lookup.
// This will also trigger the loading of the qmldir and the import of any native
@@ -538,9 +538,10 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
qmldircomponentsnetwork = parser.components();
}
- importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, QLatin1String("."),
- QString(), -1, -1, QDeclarativeScriptParser::Import::File,
- 0); // error ignored (just means no fallback)
+ unit->imports.addImport(importDatabase,
+ QLatin1String("."), QString(), -1, -1, QDeclarativeScriptParser::Import::File,
+ qmldircomponentsnetwork,
+ 0); // error ignored (just means no fallback)
}
@@ -577,8 +578,9 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
}
QString errorString;
- if (!importDatabase.addToImport(&unit->imports, qmldircomponentsnetwork, imp.uri, imp.qualifier,
- vmaj, vmin, imp.type, &errorString)) {
+ if (!unit->imports.addImport(importDatabase,
+ imp.uri, imp.qualifier, vmaj, vmin, imp.type,
+ qmldircomponentsnetwork, &errorString)) {
QDeclarativeError error;
error.setUrl(unit->imports.baseUrl());
error.setDescription(errorString);
@@ -606,8 +608,8 @@ int QDeclarativeCompositeTypeManager::resolveTypes(QDeclarativeCompositeTypeData
int minorVersion;
QDeclarativeImportedNamespace *typeNamespace = 0;
QString errorString;
- if (!importDatabase.resolveType(unit->imports, typeName, &ref.type, &url, &majorVersion, &minorVersion,
- &typeNamespace, &errorString) || typeNamespace) {
+ if (!unit->imports.resolveType(typeName, &ref.type, &url, &majorVersion, &minorVersion,
+ &typeNamespace, &errorString) || typeNamespace) {
// Known to not be a type:
// - known to be a namespace (Namespace {})
// - type with unknown namespace (UnknownNamespace.SomeType {})
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index a3b16d9..de45a95 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -660,14 +660,12 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
if (!engine)
return;
- Q_ASSERT(script.codes.count() == 1);
-
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
QScriptEngine *scriptEngine = QDeclarativeEnginePrivate::getScriptEngine(engine);
- const QString &code = script.codes.at(0);
- const QString &url = script.files.at(0);
- const QDeclarativeParser::Object::ScriptBlock::Pragmas &pragmas = script.pragmas.at(0);
+ const QString &code = script.code;
+ const QString &url = script.file;
+ const QDeclarativeParser::Object::ScriptBlock::Pragmas &pragmas = script.pragmas;
Q_ASSERT(!url.isEmpty());
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
index 5c21ebc..8f95e26 100644
--- a/src/declarative/qml/qdeclarativeimport.cpp
+++ b/src/declarative/qml/qdeclarativeimport.cpp
@@ -109,6 +109,11 @@ public:
QHash<QString,QDeclarativeImportedNamespace* > set;
};
+/*!
+\class QDeclarativeImports
+\brief The QDeclarativeImports class encapsulates one QML document's import statements.
+\internal
+*/
QDeclarativeImports::QDeclarativeImports(const QDeclarativeImports &copy)
: d(copy.d)
{
@@ -181,7 +186,7 @@ cacheForNamespace(QDeclarativeEngine *engine, const QDeclarativeImportedNamespac
return cache;
}
-void QDeclarativeImports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
+void QDeclarativeImports::populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *engine) const
{
const QDeclarativeImportedNamespace &set = d->unqualifiedset;
@@ -201,6 +206,67 @@ void QDeclarativeImports::cache(QDeclarativeTypeNameCache *cache, QDeclarativeEn
cacheForNamespace(engine, set, cache);
}
+
+/*!
+ \internal
+
+ The given (namespace qualified) \a type is resolved to either
+ \list
+ \o a QDeclarativeImportedNamespace stored at \a ns_return,
+ \o a QDeclarativeType stored at \a type_return, or
+ \o a component located at \a url_return.
+ \endlist
+
+ If any return pointer is 0, the corresponding search is not done.
+
+ \sa addImport()
+*/
+bool QDeclarativeImports::resolveType(const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin,
+ QDeclarativeImportedNamespace** ns_return, QString *errorString) const
+{
+ QDeclarativeImportedNamespace* ns = d->findNamespace(QString::fromUtf8(type));
+ if (ns) {
+ if (ns_return)
+ *ns_return = ns;
+ return true;
+ }
+ if (type_return || url_return) {
+ if (d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
+ if (qmlImportTrace()) {
+ if (type_return && *type_return && url_return && !url_return->isEmpty())
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << (*type_return)->typeName() << " " << *url_return;
+ if (type_return && *type_return)
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << (*type_return)->typeName();
+ if (url_return && !url_return->isEmpty())
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::resolveType: "
+ << type << " => " << *url_return;
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+/*!
+ \internal
+
+ Searching \e only in the namespace \a ns (previously returned in a call to
+ resolveType(), \a type is found and returned to either
+ a QDeclarativeType stored at \a type_return, or
+ a component located at \a url_return.
+
+ If either return pointer is 0, the corresponding search is not done.
+*/
+bool QDeclarativeImports::resolveType(QDeclarativeImportedNamespace* ns, const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *vmaj, int *vmin) const
+{
+ return ns->find(type,vmaj,vmin,type_return,url_return);
+}
+
bool QDeclarativeImportedNamespace::find_helper(int i, const QByteArray& type, int *vmajor, int *vminor,
QDeclarativeType** type_return, QUrl* url_return,
QUrl *base, bool *typeRecursionDetected)
@@ -280,15 +346,16 @@ QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate()
}
bool QDeclarativeImportsPrivate::importExtension(const QString &absoluteFilePath, const QString &uri,
- QDeclarativeImportDatabase *database,
- QDeclarativeDirComponents* components, QString *errorString)
+ QDeclarativeImportDatabase *database,
+ QDeclarativeDirComponents* components, QString *errorString)
{
QFile file(absoluteFilePath);
QString filecontent;
if (file.open(QFile::ReadOnly)) {
filecontent = QString::fromUtf8(file.readAll());
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::add: loaded" << absoluteFilePath;
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(base.toString()) << "::importExtension: "
+ << "loaded " << absoluteFilePath;
} else {
if (errorString)
*errorString = QDeclarativeImportDatabase::tr("module \"%1\" definition \"%2\" not readable").arg(uri).arg(absoluteFilePath);
@@ -576,6 +643,10 @@ bool QDeclarativeImportedNamespace::find(const QByteArray& type, int *vmajor, in
return false;
}
+/*!
+\class QDeclarativeImportDatabase
+\brief The QDeclarativeImportDatabase class manages the QML imports for a QDeclarativeEngine.
+*/
QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
: engine(e)
{
@@ -619,75 +690,19 @@ QDeclarativeImportDatabase::~QDeclarativeImportDatabase()
The base URL must already have been set with Import::setBaseUrl().
*/
-bool QDeclarativeImportDatabase::addToImport(QDeclarativeImports* imports,
- const QDeclarativeDirComponents &qmldircomponentsnetwork,
- const QString& uri, const QString& prefix, int vmaj, int vmin,
- QDeclarativeScriptParser::Import::Type importType,
- QString *errorString)
+bool QDeclarativeImports::addImport(QDeclarativeImportDatabase *importDb,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ QString *errorString)
{
if (qmlImportTrace())
- qDebug().nospace() << "QDeclarativeImportDatabase::addToImport " << imports << " " << uri << " "
- << vmaj << '.' << vmin << " "
+ qDebug().nospace() << "QDeclarativeImports(" << qPrintable(baseUrl().toString()) << ")" << "::addImport: "
+ << uri << " " << vmaj << '.' << vmin << " "
<< (importType==QDeclarativeScriptParser::Import::Library? "Library" : "File")
<< " as " << prefix;
- bool ok = imports->d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, this, errorString);
- return ok;
-}
-
-/*!
- \internal
-
- Using the given \a imports, the given (namespace qualified) \a type is resolved to either
- a QDeclarativeImportedNamespace stored at \a ns_return,
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If any return pointer is 0, the corresponding search is not done.
-
- \sa addToImport()
-*/
-bool QDeclarativeImportDatabase::resolveType(const QDeclarativeImports& imports, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return, int *vmaj, int *vmin,
- QDeclarativeImportedNamespace** ns_return, QString *errorString) const
-{
- QDeclarativeImportedNamespace* ns = imports.d->findNamespace(QString::fromUtf8(type));
- if (ns) {
- if (ns_return)
- *ns_return = ns;
- return true;
- }
- if (type_return || url_return) {
- if (imports.d->find(type,vmaj,vmin,type_return,url_return, errorString)) {
- if (qmlImportTrace()) {
- if (type_return && *type_return && url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName() << *url_return;
- if (type_return && *type_return)
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << (*type_return)->typeName();
- if (url_return && !url_return->isEmpty())
- qDebug() << "QDeclarativeImportDatabase::resolveType" << type << '=' << *url_return;
- }
- return true;
- }
- }
- return false;
-}
-
-/*!
- \internal
-
- Searching \e only in the namespace \a ns (previously returned in a call to
- resolveType(), \a type is found and returned to either
- a QDeclarativeType stored at \a type_return, or
- a component located at \a url_return.
-
- If either return pointer is 0, the corresponding search is not done.
-*/
-bool QDeclarativeImportDatabase::resolveTypeInNamespace(QDeclarativeImportedNamespace* ns, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *vmaj, int *vmin) const
-{
- return ns->find(type,vmaj,vmin,type_return,url_return);
+ return d->add(qmldircomponentsnetwork, uri, prefix, vmaj, vmin, importType, importDb, errorString);
}
/*!
@@ -834,7 +849,7 @@ void QDeclarativeImportDatabase::setPluginPathList(const QStringList &paths)
void QDeclarativeImportDatabase::addPluginPath(const QString& path)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::addPluginPath" << path;
+ qDebug().nospace() << "QDeclarativeImportDatabase::addPluginPath: " << path;
QUrl url = QUrl(path);
if (url.isRelative() || url.scheme() == QLatin1String("file")) {
@@ -848,7 +863,7 @@ void QDeclarativeImportDatabase::addPluginPath(const QString& path)
void QDeclarativeImportDatabase::addImportPath(const QString& path)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::addImportPath" << path;
+ qDebug().nospace() << "QDeclarativeImportDatabase::addImportPath: " << path;
if (path.isEmpty())
return;
@@ -882,7 +897,7 @@ void QDeclarativeImportDatabase::setImportPathList(const QStringList &paths)
bool QDeclarativeImportDatabase::importPlugin(const QString &filePath, const QString &uri, QString *errorString)
{
if (qmlImportTrace())
- qDebug() << "QDeclarativeImportDatabase::importPlugin" << uri << "from" << filePath;
+ qDebug().nospace() << "QDeclarativeImportDatabase::importPlugin: " << uri << " from " << filePath;
QFileInfo fileInfo(filePath);
const QString absoluteFilePath = fileInfo.absoluteFilePath();
diff --git a/src/declarative/qml/qdeclarativeimport_p.h b/src/declarative/qml/qdeclarativeimport_p.h
index 88246d4..84802de 100644
--- a/src/declarative/qml/qdeclarativeimport_p.h
+++ b/src/declarative/qml/qdeclarativeimport_p.h
@@ -65,9 +65,10 @@ QT_BEGIN_NAMESPACE
class QDeclarativeTypeNameCache;
class QDeclarativeEngine;
class QDir;
-
class QDeclarativeImportedNamespace;
class QDeclarativeImportsPrivate;
+class QDeclarativeImportDatabase;
+
class QDeclarativeImports
{
public:
@@ -79,7 +80,24 @@ public:
void setBaseUrl(const QUrl &url);
QUrl baseUrl() const;
- void cache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+ bool resolveType(const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor,
+ QDeclarativeImportedNamespace** ns_return,
+ QString *errorString = 0) const;
+ bool resolveType(QDeclarativeImportedNamespace*,
+ const QByteArray& type,
+ QDeclarativeType** type_return, QUrl* url_return,
+ int *version_major, int *version_minor) const;
+
+ bool addImport(QDeclarativeImportDatabase *,
+ const QString& uri, const QString& prefix, int vmaj, int vmin,
+ QDeclarativeScriptParser::Import::Type importType,
+ const QDeclarativeDirComponents &qmldircomponentsnetwork,
+ QString *errorString);
+
+ void populateCache(QDeclarativeTypeNameCache *cache, QDeclarativeEngine *) const;
+
private:
friend class QDeclarativeImportDatabase;
QDeclarativeImportsPrivate *d;
@@ -102,21 +120,6 @@ public:
void setPluginPathList(const QStringList &paths);
void addPluginPath(const QString& path);
-
- bool addToImport(QDeclarativeImports*, const QDeclarativeDirComponents &qmldircomponentsnetwork,
- const QString& uri, const QString& prefix, int vmaj, int vmin,
- QDeclarativeScriptParser::Import::Type importType,
- QString *errorString);
- bool resolveType(const QDeclarativeImports&, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor,
- QDeclarativeImportedNamespace** ns_return,
- QString *errorString = 0) const;
- bool resolveTypeInNamespace(QDeclarativeImportedNamespace*, const QByteArray& type,
- QDeclarativeType** type_return, QUrl* url_return,
- int *version_major, int *version_minor ) const;
-
-
private:
friend class QDeclarativeImportsPrivate;
QString resolvePlugin(const QDir &qmldirPath, const QString &qmldirPluginPath,
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index d192f3a..c58aebc 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -183,10 +183,9 @@ namespace QDeclarativeParser
};
Q_DECLARE_FLAGS(Pragmas, Pragma)
- QStringList codes;
- QStringList files;
- QList<int> lineNumbers;
- QList<Pragmas> pragmas;
+ QString code;
+ QString file;
+ Pragmas pragmas;
};
// The bytes to cast instances by to get to the QDeclarativeParserStatus
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 4e9e8d5..267642d 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -84,11 +84,6 @@ QT_BEGIN_NAMESPACE
element directly will result in an error.
*/
-/*!
- \class QDeclarativeAbstractAnimation
- \internal
-*/
-
QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(QObject *parent)
: QObject(*(new QDeclarativeAbstractAnimationPrivate), parent)
{
@@ -574,12 +569,6 @@ void QDeclarativeAbstractAnimation::timelineComplete()
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativePauseAnimation
-*/
-
-
QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
{
@@ -659,11 +648,6 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativeColorAnimation
-*/
-
QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -776,10 +760,6 @@ void QDeclarativeColorAnimation::setTo(const QColor &t)
\sa StateChangeScript
*/
-/*!
- \internal
- \class QDeclarativeScriptAction
-*/
QDeclarativeScriptAction::QDeclarativeScriptAction(QObject *parent)
:QDeclarativeAbstractAnimation(*(new QDeclarativeScriptActionPrivate), parent)
{
@@ -933,10 +913,6 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\sa {QML Animation}, QtDeclarative
*/
-/*!
- \internal
- \class QDeclarativePropertyAction
-*/
QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
{
@@ -1185,12 +1161,6 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeNumberAnimation
-*/
-
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -1276,7 +1246,7 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
/*!
\qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits PropertyAnimation
\brief The Vector3dAnimation element animates changes in QVector3d values.
@@ -1291,12 +1261,6 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeVector3dAnimation
-*/
-
QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
{
@@ -1396,12 +1360,6 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeRotationAnimation
-*/
-
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
{
qreal newt = t;
@@ -1702,11 +1660,6 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-/*!
- \internal
- \class QDeclarativeParallelAnimation
-*/
-
QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
QDeclarativeAnimationGroup(parent)
{
@@ -2512,11 +2465,6 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
-
-/*!
- \internal
- \class QDeclarativeParentAnimation
-*/
QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
: QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp
index 86d08f5..88b45ae 100644
--- a/src/declarative/util/qdeclarativebind.cpp
+++ b/src/declarative/util/qdeclarativebind.cpp
@@ -72,7 +72,7 @@ public:
/*!
\qmlclass Binding QDeclarativeBind
- \ingroup qml-working-with-data
+ \ingroup qml-working-with-data
\since 4.7
\brief The Binding element allows arbitrary property bindings to be created.
@@ -95,18 +95,7 @@ public:
immediately pushed onto the new target.
\sa QtDeclarative
- */
-/*!
- \internal
- \class QDeclarativeBind
- \brief The QDeclarativeBind class allows arbitrary property bindings to be created.
-
- Simple bindings are usually earier to do in-place rather than creating a
- QDeclarativeBind item. For that reason, QDeclarativeBind is usually used to transfer property information
- from Qml to C++.
-
- \sa cppqml
- */
+*/
QDeclarativeBind::QDeclarativeBind(QObject *parent)
: QObject(*(new QDeclarativeBindPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 293928e..15e5ac5 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -124,13 +124,6 @@ public:
\sa QtDeclarative
*/
-
-/*!
- \internal
- \class QDeclarativeConnections
- \brief The QDeclarativeConnections class describes generalized connections to signals.
-
-*/
QDeclarativeConnections::QDeclarativeConnections(QObject *parent) :
QObject(*(new QDeclarativeConnectionsPrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 0162beb..7504c23 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -58,9 +58,6 @@ Q_DECLARE_METATYPE(QListModelInterface *)
QT_BEGIN_NAMESPACE
-#define DATA_ROLE_ID 1
-#define DATA_ROLE_NAME "data"
-
QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const
{
return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData));
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index c28ada3..e897458 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -127,12 +127,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \internal
- \class QDeclarativePropertyChanges
- \brief The QDeclarativePropertyChanges class describes new property values for a state.
-*/
-
-/*!
\qmlproperty Object PropertyChanges::target
This property holds the object which contains the properties to be changed.
*/
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 6e17cf2..1ed7923 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -123,9 +123,6 @@ bool QDeclarativeActionEvent::override(QDeclarativeActionEvent *other)
return false;
}
-/*!
- \internal
-*/
QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent)
: QObject(dd, parent)
{
@@ -164,20 +161,6 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
\sa {declarative/animation/states}{states example}, {qmlstates}{States},
{qdeclarativeanimation.html#transitions}{QML Transitions}, QtDeclarative
*/
-
-/*!
- \internal
- \class QDeclarativeState
- \brief The QDeclarativeState class allows you to define configurations of objects and properties.
-
-
- QDeclarativeState allows you to specify a state as a set of batched changes from the default
- configuration.
-
- \sa {states-transitions}{States and Transitions}
-*/
-
-
QDeclarativeState::QDeclarativeState(QObject *parent)
: QObject(*(new QDeclarativeStatePrivate), parent)
{
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 21d7ded..478c7f4 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -99,12 +99,6 @@ QT_BEGIN_NAMESPACE
\sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
*/
-/*!
- \internal
- \class QDeclarativeTransition
- \brief The QDeclarativeTransition class allows you to define animated transitions that occur on state changes.
-*/
-
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
//and disconnecting signals and slots frequently
class ParallelAnimationWrapper : public QParallelAnimationGroup
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 7b3d4a8..47b502d 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -466,8 +466,6 @@ public:
QList<QDeclarativeXmlListModelRole *> roleObjects;
static void append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role);
static void clear_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list);
- static void removeAt_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i);
- static void insert_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, int i, QDeclarativeXmlListModelRole *role);
QList<QList<QVariant> > data;
int redirectCount;
};
@@ -500,11 +498,6 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
}
/*!
- \class QDeclarativeXmlListModel
- \internal
-*/
-
-/*!
\qmlclass XmlListModel QDeclarativeXmlListModel
\ingroup qml-working-with-data
\since 4.7