summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativexmllistmodel.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-01-17 19:33:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-20 16:53:10 +0100
commita0d27513f4eff3f76fd85e6442aca443b7c05a53 (patch)
tree2239ed849796744299fbe25ab3cc50c2867160e9 /src/declarative/util/qdeclarativexmllistmodel.cpp
parent9ba631edb469599d3973982f8d5d72a9ba059eab (diff)
whitespace fixes
remove trailing spaces & expand tabs Change-Id: Ia088c8cc8a83d068f6e2ec84903b5220cd3411f1 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/declarative/util/qdeclarativexmllistmodel.cpp')
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 7139581a..badfff43 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -114,7 +114,7 @@ typedef QPair<int, int> QDeclarativeXmlListRange;
For example, if there is an XML document like this:
\quotefile doc/src/snippets/declarative/xmlrole.xml
-
+
Here are some valid XPath expressions for XmlRole queries on this document:
\snippet doc/src/snippets/declarative/xmlrole.qml 0
@@ -127,7 +127,7 @@ typedef QPair<int, int> QDeclarativeXmlListRange;
/*!
\qmlproperty bool XmlRole::isKey
Defines whether this is a key role.
-
+
Key roles are used to to determine whether a set of values should
be updated or added to the XML list model when XmlListModel::reload()
is called.
@@ -321,7 +321,7 @@ void QDeclarativeXmlQueryEngine::processJobs()
return;
currentJob = m_jobs.takeLast();
}
-
+
locker.unlock();
processQuery(&currentJob);
locker.relock();
@@ -450,7 +450,7 @@ void QDeclarativeXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QDeclara
for (int i=0; i<currentJob->keyRoleResultsCache.count(); i++) {
if (!keyRoleResults.contains(currentJob->keyRoleResultsCache[i]))
addIndexToRangeList(&currentResult->removed, i);
- else
+ else
temp << currentJob->keyRoleResultsCache[i];
}
@@ -644,10 +644,10 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\endqml
The \l {XmlListModel::query}{query} value of "/rss/channel/item" specifies that the XmlListModel should generate
- a model item for each \c <item> in the XML document.
-
+ a model item for each \c <item> in the XML document.
+
The XmlRole objects define the
- model item attributes. Here, each model item will have \c title and \c pubDate
+ model item attributes. Here, each model item will have \c title and \c pubDate
attributes that match the \c title and \c pubDate values of its corresponding \c <item>.
(See \l XmlRole::query for more examples of valid XPath expressions for XmlRole.)
@@ -682,8 +682,8 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\endqml
Then when reload() is called, the model will only add and reload
- items with a "pubDate" value that is not already
- present in the model.
+ items with a "pubDate" value that is not already
+ present in the model.
This is useful when displaying the contents of XML documents that
are incrementally updated (such as RSS feeds) to avoid repainting the
@@ -901,9 +901,9 @@ QScriptValue QDeclarativeXmlListModel::get(int index) const
return sengine->undefinedValue();
QScriptValue sv = sengine->newObject();
- for (int i=0; i<d->roleObjects.count(); i++)
+ for (int i=0; i<d->roleObjects.count(); i++)
sv.setProperty(d->roleObjects[i]->name(), sengine->toScriptValue(d->data.value(i).value(index)));
- return sv;
+ return sv;
}
/*!
@@ -935,7 +935,7 @@ QDeclarativeXmlListModel::Status QDeclarativeXmlListModel::status() const
1.0 (all data downloaded). If the XML data is not from a remote source,
the progress becomes 1.0 as soon as the data is read.
- Note that when the progress is 1.0, the XML data has been downloaded, but
+ Note that when the progress is 1.0, the XML data has been downloaded, but
it is yet to be loaded into the model at this point. Use the status
property to find out when the XML data has been read and loaded into
the model.
@@ -983,13 +983,13 @@ void QDeclarativeXmlListModel::componentComplete()
\qmlmethod XmlListModel::reload()
Reloads the model.
-
+
If no key roles have been specified, all existing model
data is removed, and the model is rebuilt from scratch.
Otherwise, items are only added if the model does not already
contain items with matching key role values.
-
+
\sa {Using key XML roles}, XmlRole::isKey
*/
void QDeclarativeXmlListModel::reload()