XmlListModel {
property string tags : ""
- function commasep(x)
- {
- return x.replace(' ',',');
- }
+ function encodeTags(x) { return encodeURIComponent(x.replace(' ',',')); }
- source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+commasep(tags)+"&" : "")+"format=rss2"
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+encodeTags(tags)+"&" : "")+"format=rss2"
query: "/rss/channel/item"
namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
XmlListModel {
property string tags : ""
- source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")
+ function encodeTags(x) { return encodeURIComponent(x.replace(' ',',')); }
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+encodeTags(tags)+"&" : "")
query: "/feed/entry"
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
XmlListModel {
property string tags : ""
- source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")
+ function encodeTags(x) { return encodeURIComponent(x.replace(' ',',')); }
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+encodeTags(tags)+"&" : "")
query: "/feed/entry"
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';"
property string mode : "everyone"
property int status: xmlModel.status
function reload() { xmlModel.reload(); }
+
XmlListModel {
id: xmlModel
+ function encodePhrase(x) { return encodeURIComponent(x); }
+
source: (from=="" && to=="" && phrase=="") ? "" :
- 'http://search.twitter.com/search.atom?from='+from+"&to="+to+"&phrase="+phrase
+ 'http://search.twitter.com/search.atom?from='+from+"&to="+to+"&phrase="+encodePhrase(phrase)
namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom'; " +
"declare namespace twitter=\"http://api.twitter.com/\";";