summaryrefslogtreecommitdiffstats
path: root/src/declarative/extra
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-06-12 05:35:27 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-06-12 05:35:27 (GMT)
commit87dff0ac19fc8af4c30fd7959723fbdb60eb3bdf (patch)
treed5160fd174446fb8df617114eb001f474efbfb40 /src/declarative/extra
parent815df4da786a778517b1fac8435cc052d791ce92 (diff)
downloadQt-87dff0ac19fc8af4c30fd7959723fbdb60eb3bdf.zip
Qt-87dff0ac19fc8af4c30fd7959723fbdb60eb3bdf.tar.gz
Qt-87dff0ac19fc8af4c30fd7959723fbdb60eb3bdf.tar.bz2
Some XmlListModel cleanup.
Diffstat (limited to 'src/declarative/extra')
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp4
-rw-r--r--src/declarative/extra/qmlxmllistmodel.h12
2 files changed, 3 insertions, 13 deletions
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index b10f5fd..51905fa 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -230,7 +230,7 @@ void QmlXmlQuery::doSubQueryJob()
QXmlItem item(output3.next());
QList<QVariant> resultList;
while (!item.isNull()) {
- resultList << item.toAtomicValue();
+ resultList << item.toAtomicValue(); //### we used to trim strings
item = output3.next();
}
m_modelData << resultList;
@@ -346,7 +346,7 @@ void QmlXmlRoleList::insert(int i, XmlListModelRole *role)
query: "doc($src)/rss/channel/item"
Role { name: "title"; query: "title/string()" }
Role { name: "link"; query: "link/string()" }
- Role { name: "description"; query: "description/string()"; isCData: true }
+ Role { name: "description"; query: "description/string()" }
}
\endqml
\note The model is currently static, so the above is really just a snapshot of an RSS feed.
diff --git a/src/declarative/extra/qmlxmllistmodel.h b/src/declarative/extra/qmlxmllistmodel.h
index bdbba47..c6aae4a 100644
--- a/src/declarative/extra/qmlxmllistmodel.h
+++ b/src/declarative/extra/qmlxmllistmodel.h
@@ -57,11 +57,9 @@ class Q_DECLARATIVE_EXPORT XmlListModelRole : public QObject
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(QString query READ query WRITE setQuery)
- Q_PROPERTY(bool isCData READ isCData WRITE setIsCData)
- Q_PROPERTY(bool isStringList READ isStringList WRITE setIsStringList)
public:
- XmlListModelRole() : m_isList(false), m_isCData(false) {}
+ XmlListModelRole() {}
~XmlListModelRole() {}
QString name() const { return m_name; }
@@ -70,17 +68,9 @@ public:
QString query() const { return m_query; }
void setQuery(const QString &query) { m_query = query; }
- bool isStringList() const { return m_isList; }
- void setIsStringList(bool b) { m_isList = b; }
-
- bool isCData() const { return m_isCData; }
- void setIsCData(bool b) { m_isCData = b; }
-
private:
QString m_name;
QString m_query;
- bool m_isList;
- bool m_isCData;
};
QML_DECLARE_TYPE(XmlListModelRole)