summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-01-07 00:51:34 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-01-07 00:51:34 (GMT)
commit5b67b61150771cf978648a35db201345d6fb37ae (patch)
treec8927dd65b3d1edeff76fd21ac0c49b7ace72bf6 /src/declarative
parentc527a1ee371c4758776217e7d16c75e20fe6f5aa (diff)
parent9cc21c043238dc7576a465c9d236e8968fd8c549 (diff)
downloadQt-5b67b61150771cf978648a35db201345d6fb37ae.zip
Qt-5b67b61150771cf978648a35db201345d6fb37ae.tar.gz
Qt-5b67b61150771cf978648a35db201345d6fb37ae.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Conflicts: src/declarative/graphicsitems/qdeclarativeitem.cpp tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp9
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp54
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp21
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp8
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp17
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp6
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp11
-rw-r--r--src/declarative/qml/qdeclarativecomponent_p.h1
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp12
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp16
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp2
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp8
-rw-r--r--src/declarative/util/qdeclarativeview.cpp7
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp1
17 files changed, 116 insertions, 67 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 337965f..52ad1e1 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -671,10 +671,12 @@ void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction)
void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event)
{
+ Q_Q(QDeclarativeFlickable);
if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10))
stealMouse = true; // If we've been flicked then steal the click.
else
stealMouse = false;
+ q->setKeepMouseGrab(stealMouse);
pressed = true;
timeline.clear();
hData.velocity = 0;
@@ -769,6 +771,8 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
}
stealMouse = stealX || stealY;
+ if (stealMouse)
+ q->setKeepMouseGrab(true);
if (!lastPos.isNull()) {
qreal elapsed = qreal(QDeclarativeItemPrivate::restart(lastPosTime)) / 1000.;
@@ -848,8 +852,6 @@ void QDeclarativeFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Q_D(QDeclarativeFlickable);
if (d->interactive) {
d->handleMouseMoveEvent(event);
- if (d->stealMouse)
- setKeepMouseGrab(true);
event->accept();
} else {
QDeclarativeItem::mouseMoveEvent(event);
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 5aa88b5..c2c28c2 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1131,6 +1131,13 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
+ GridView attaches a number of properties to the root item of the delegate, for example
+ \c {GridView.isCurrentItem}. In the following example, the root delegate item can access
+ this attached property directly as \c GridView.isCurrentItem, while the child
+ \c contactInfo object must refer to this property as \c wrapper.GridView.isCurrentItem.
+
+ \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem
+
\note Views do not set the \l{Item::}{clip} property automatically.
If the view is not clipped by another item or the screen, it will be necessary
to set this property to true in order to clip the items that are partially or
@@ -1167,6 +1174,8 @@ QDeclarativeGridView::~QDeclarativeGridView()
This attached property holds the view that manages this delegate instance.
It is attached to each instance of the delegate.
+
+ \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 4cf9b26..295a889 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -461,8 +461,16 @@ void QDeclarativeItemKeyFilter::componentComplete()
\qmlproperty Item KeyNavigation::backtab
These properties hold the item to assign focus to
- when Key_Left, Key_Right, Key_Up, Key_Down, Key_Tab or Key_BackTab
- are pressed.
+ when the left, right, up or down cursor keys, or the
+ tab key are pressed.
+*/
+
+/*!
+ \qmlproperty Item KeyNavigation::tab
+ \qmlproperty Item KeyNavigation::backtab
+
+ These properties hold the item to assign focus to
+ when the Tab key or Shift+Tab key combination (Backtab) are pressed.
*/
QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent)
@@ -941,6 +949,20 @@ void QDeclarativeKeyNavigationAttached::setFocusNavigation(QDeclarativeItem *cur
*/
/*!
+ \qmlsignal Keys::onTabPressed(KeyEvent event)
+
+ This handler is called when the Tab key has been pressed. The \a event
+ parameter provides information about the event.
+*/
+
+/*!
+ \qmlsignal Keys::onBacktabPressed(KeyEvent event)
+
+ This handler is called when the Shift+Tab key combination (Backtab) has
+ been pressed. The \a event parameter provides information about the event.
+*/
+
+/*!
\qmlsignal Keys::onAsteriskPressed(KeyEvent event)
This handler is called when the Asterisk '*' has been pressed. The \a event
@@ -1341,23 +1363,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
}
\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
@@ -1384,17 +1389,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
\endqml
See the \l {Keys}{Keys} attached property for detailed documentation.
-
- \section1 Property Change Signals
-
- Most properties on Item and Item derivatives have a signal
- emitted when they change. By convention, the signals are
- named <propertyName>Changed, e.g. xChanged will be emitted when an item's
- x property changes. Note that these also have signal handers e.g.
- the onXChanged signal handler will be called when an item's x property
- changes. For many properties in Item or Item derivatives this can be used
- to add a touch of imperative logic to your application (when absolutely
- necessary).
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 2a7f508..702442b 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -643,7 +643,8 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer)
int i = visibleItems.count() - 1;
while (i > 0 && visibleItems.at(i)->index == -1)
--i;
- modelIndex = visibleItems.at(i)->index + 1;
+ if (visibleItems.at(i)->index != -1)
+ modelIndex = visibleItems.at(i)->index + 1;
}
bool changed = false;
@@ -1415,6 +1416,13 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
+ ListView attaches a number of properties to the root item of the delegate, for example
+ \c {ListView.isCurrentItem}. In the following example, the root delegate item can access
+ this attached property directly as \c ListView.isCurrentItem, while the child
+ \c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem.
+
+ \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem
+
\note Views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
@@ -2804,7 +2812,10 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
int i = d->visibleItems.count() - 1;
while (i > 0 && d->visibleItems.at(i)->index == -1)
--i;
- if (d->visibleItems.at(i)->index + 1 == modelIndex
+ if (i == 0 && d->visibleItems.first()->index == -1) {
+ // there are no visible items except items marked for removal
+ index = d->visibleItems.count();
+ } else if (d->visibleItems.at(i)->index + 1 == modelIndex
&& d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) {
// Special case of appending an item to the model.
index = d->visibleItems.count();
@@ -2836,7 +2847,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count)
// index can be the next item past the end of the visible items list (i.e. appended)
int pos = index < d->visibleItems.count() ? d->visibleItems.at(index)->position()
- : d->visibleItems.at(index-1)->endPosition()+d->spacing+1;
+ : d->visibleItems.last()->endPosition()+d->spacing+1;
int initialPos = pos;
int diff = 0;
QList<FxListItem*> added;
@@ -2988,14 +2999,16 @@ void QDeclarativeListView::itemsRemoved(int modelIndex, int count)
}
// update visibleIndex
+ bool haveVisibleIndex = false;
for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) {
if ((*it)->index != -1) {
d->visibleIndex = (*it)->index;
+ haveVisibleIndex = true;
break;
}
}
- if (removedVisible && d->visibleItems.isEmpty()) {
+ if (removedVisible && !haveVisibleIndex) {
d->timeline.clear();
if (d->itemCount == 0) {
d->visibleIndex = 0;
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index 966c51b..e63a2c3 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -46,6 +46,8 @@
#include <QTime>
#include <private/qbezier_p.h>
+#include <QtCore/qmath.h>
+#include <QtCore/qnumeric.h>
QT_BEGIN_NAMESPACE
@@ -367,9 +369,11 @@ void QDeclarativePath::createPointCache() const
{
Q_D(const QDeclarativePath);
qreal pathLength = d->_path.length();
+ if (pathLength <= 0 || qIsNaN(pathLength))
+ return;
// more points means less jitter between items as they move along the
// path, but takes longer to generate
- const int points = int(pathLength*5);
+ const int points = qCeil(pathLength*5);
const int lastElement = d->_path.elementCount() - 1;
d->_pointCache.resize(points+1);
@@ -418,6 +422,8 @@ QPointF QDeclarativePath::pointAt(qreal p) const
Q_D(const QDeclarativePath);
if (d->_pointCache.isEmpty()) {
createPointCache();
+ if (d->_pointCache.isEmpty())
+ return QPointF();
}
int idx = qRound(p*d->_pointCache.size());
if (idx >= d->_pointCache.size())
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index 87ea214..74d3418 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -393,6 +393,13 @@ void QDeclarativePathViewPrivate::regenerate()
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
+ PathView attaches a number of properties to the root item of the delegate, for example
+ \c {PathView.isCurrentItem}. In the following example, the root delegate item can access
+ this attached property directly as \c PathView.isCurrentItem, while the child
+ \c nameText object must refer to this property as \c wrapper.PathView.isCurrentItem.
+
+ \snippet doc/src/snippets/declarative/pathview/pathview.qml 1
+
\bold Note that views do not enable \e clip automatically. If the view
is not clipped by another item or the screen, it will be necessary
to set \e {clip: true} in order to have the out of view items clipped
@@ -452,6 +459,8 @@ QDeclarativePathView::~QDeclarativePathView()
It is attached to each instance of the delegate.
This property may be used to adjust the appearance of the current item.
+
+ \snippet doc/src/snippets/declarative/pathview/pathview.qml 1
*/
/*!
@@ -1133,8 +1142,10 @@ void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
QPointF pathPoint = pointNear(event->pos(), &newPc);
if (!stealMouse) {
QPointF delta = pathPoint - startPoint;
- if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance())
+ if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) {
stealMouse = true;
+ startPc = newPc;
+ }
}
if (stealMouse) {
@@ -1307,8 +1318,10 @@ void QDeclarativePathView::componentComplete()
// It is possible that a refill has already happended to to Path
// bindings being handled in the componentComplete(). If so
// don't do it again.
- if (d->items.count() == 0)
+ if (d->items.count() == 0 && d->model) {
+ d->modelCount = d->model->count();
d->regenerate();
+ }
d->updateHighlight();
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index c1314ff..b76a70c 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -644,6 +644,8 @@ int QDeclarativeTextEdit::cursorPosition() const
void QDeclarativeTextEdit::setCursorPosition(int pos)
{
Q_D(QDeclarativeTextEdit);
+ if (pos < 0 || pos > d->text.length())
+ return;
QTextCursor cursor = d->control->textCursor();
if (cursor.position() == pos)
return;
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 4e1c297..ac07d4b 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -445,6 +445,8 @@ int QDeclarativeTextInput::cursorPosition() const
void QDeclarativeTextInput::setCursorPosition(int cp)
{
Q_D(QDeclarativeTextInput);
+ if (cp < 0 || cp > d->control->text().length())
+ return;
d->control->moveCursor(cp);
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index dd07067..a5fae36 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -774,6 +774,8 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model)
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;
+ if (d->m_abstractItemModel->canFetchMore(d->m_root))
+ d->m_abstractItemModel->fetchMore(d->m_root);
return;
}
if ((d->m_visualItemModel = qvariant_cast<QDeclarativeVisualDataModel *>(model))) {
@@ -871,6 +873,8 @@ void QDeclarativeVisualDataModel::setRootIndex(const QVariant &root)
if (d->m_root != modelIndex) {
int oldCount = d->modelCount();
d->m_root = modelIndex;
+ if (d->m_abstractItemModel && d->m_abstractItemModel->canFetchMore(modelIndex))
+ d->m_abstractItemModel->fetchMore(modelIndex);
int newCount = d->modelCount();
if (d->m_delegate && oldCount)
emit itemsRemoved(0, oldCount);
@@ -1095,6 +1099,8 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray
d->m_delegateValidated = true;
}
}
+ if (d->modelCount()-1 == index && d->m_abstractItemModel && d->m_abstractItemModel->canFetchMore(d->m_root))
+ d->m_abstractItemModel->fetchMore(d->m_root);
return item;
}
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index a8b1c3f..38bd74b 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -699,17 +699,6 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context)
return rv;
}
-QObject *QDeclarativeComponentPrivate::create(QDeclarativeContextData *context,
- const QBitField &bindings)
-{
- if (!context)
- context = QDeclarativeContextData::get(engine->rootContext());
-
- QObject *rv = beginCreate(context, bindings);
- completeCreate();
- return rv;
-}
-
/*!
This method provides more advanced control over component instance creation.
In general, programmers should use QDeclarativeComponent::create() to create a
diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
index 7b30bad..daf1dcb 100644
--- a/src/declarative/qml/qdeclarativecomponent_p.h
+++ b/src/declarative/qml/qdeclarativecomponent_p.h
@@ -81,7 +81,6 @@ class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, pu
public:
QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), engine(0), creationContext(0) {}
- QObject *create(QDeclarativeContextData *, const QBitField &);
QObject *beginCreate(QDeclarativeContextData *, const QBitField &);
void completeCreate();
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 3a5fe66..0a008ff 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -761,8 +761,10 @@ QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *s
QImage image;
QSharedPointer<QDeclarativeImageProvider> provider = imageProviders.value(url.host());
locker.unlock();
- if (provider)
- image = provider->requestImage(url.path().mid(1), size, req_size);
+ if (provider) {
+ QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
+ image = provider->requestImage(imageId, size, req_size);
+ }
return image;
}
@@ -772,8 +774,10 @@ QPixmap QDeclarativeEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize
QPixmap pixmap;
QSharedPointer<QDeclarativeImageProvider> provider = imageProviders.value(url.host());
locker.unlock();
- if (provider)
- pixmap = provider->requestPixmap(url.path().mid(1), size, req_size);
+ if (provider) {
+ QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1);
+ pixmap = provider->requestPixmap(imageId, size, req_size);
+ }
return pixmap;
}
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index ef31be7..e3da645 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -182,13 +182,17 @@ QDeclarativeImageProvider::ImageType QDeclarativeImageProvider::imageType() cons
Implement this method to return the image with \a id. The default
implementation returns an empty image.
+ The \a id is the requested image source, with the "image:" scheme and
+ provider identifier removed. For example, if the image \l{Image::}{source}
+ was "image://myprovider/icons/home", the given \a id would be "icons/home".
+
The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
an Image element. If \a requestedSize is a valid size, the image
returned should be of that size.
In all cases, \a size must be set to the original size of the image. This
- is used to set the \l {Item::}{width} and \l {Item::}{height} of image
- elements that should be automatically sized to the loaded image.
+ is used to set the \l {Item::}{width} and \l {Item::}{height} of the
+ relevant \l Image if these values have not been set explicitly.
\note this method may be called by multiple threads, so ensure the
implementation of this method is reentrant.
@@ -207,13 +211,17 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c
Implement this method to return the pixmap with \a id. The default
implementation returns an empty pixmap.
+ The \a id is the requested image source, with the "image:" scheme and
+ provider identifier removed. For example, if the image \l{Image::}{source}
+ was "image://myprovider/icons/home", the given \a id would be "icons/home".
+
The \a requestedSize corresponds to the \l {Image::sourceSize} requested by
an Image element. If \a requestedSize is a valid size, the image
returned should be of that size.
In all cases, \a size must be set to the original size of the image. This
- is used to set the \l {Item::}{width} and \l {Item::}{height} of image
- elements that should be automatically sized to the loaded image.
+ is used to set the \l {Item::}{width} and \l {Item::}{height} of the
+ relevant \l Image if these values have not been set explicitly.
*/
QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
{
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 4b78020..9dc214f 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -458,7 +458,7 @@ QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngin
{
d->m_lock.lock();
connect(d, SIGNAL(stopThread()), this, SLOT(quit()), Qt::DirectConnection);
- start(QThread::LowPriority);
+ start(QThread::IdlePriority);
d->m_wait.wait(&d->m_lock);
d->moveToThread(this);
d->m_lock.unlock();
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index f2e6217..dd7e5fd 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -1324,7 +1324,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
/*!
\qmlclass RotationAnimation QDeclarativeRotationAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits PropertyAnimation
\brief The RotationAnimation element animates changes in rotation values.
@@ -1333,8 +1333,8 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
over the direction of rotation during an animation.
By default, it rotates in the direction
- of the numerical change; a rotation from 0 to 240 will rotate 220 degrees
- clockwise, while a rotation from 240 to 0 will rotate 220 degrees
+ of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
+ clockwise, while a rotation from 240 to 0 will rotate 240 degrees
counterclockwise. The \l direction property can be set to specify the
direction in which the rotation should occur.
@@ -1342,7 +1342,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
between states via the shortest path:
\snippet doc/src/snippets/declarative/rotationanimation.qml 0
-
+
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index a87ca37..9d4d4b0 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -191,7 +191,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\class QDeclarativeView
- \since 4.7
+ \since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
QDeclarativeItem objects can be placed on a standard QGraphicsScene and
@@ -362,13 +362,14 @@ QDeclarativeContext* QDeclarativeView::rootContext() const
}
/*!
- \enum QDeclarativeView::Status
+ \enum QDeclarativeView::Status
Specifies the loading status of the QDeclarativeView.
\value Null This QDeclarativeView has no source set.
\value Ready This QDeclarativeView has loaded and created the QML component.
\value Loading This QDeclarativeView is loading network data.
- \value Error An error has occurred. Call errorDescription() to retrieve a description.
+ \value Error One or more errors has occurred. Call errors() to retrieve a list
+ of errors.
*/
/*! \enum QDeclarativeView::ResizeMode
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index f5c3ad4..9e616de 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -924,6 +924,7 @@ void QDeclarativeXmlListModel::reload()
} else {
d->notifyQueryStarted(true);
QNetworkRequest req(d->src);
+ req.setRawHeader("Accept", "application/xml");
d->reply = qmlContext(this)->engine()->networkAccessManager()->get(req);
QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(requestFinished()));
QObject::connect(d->reply, SIGNAL(downloadProgress(qint64,qint64)),