void AlbumTagsRequest::success( QByteArray data ) { QDomDocument xml; xml.setContent( data ); // qDebug() << data; QDomNodeList values = xml.elementsByTagName( "tag" ); for ( int i = 0; i < values.count(); i++ ) m_tags += WeightedString( values.item( i ).namedItem( "name" ).toElement().text() ); }
uint32_t IntegerAttribute::get(DocId doc, WeightedString * s, uint32_t sz) const { WeightedInt * v = new WeightedInt[sz]; unsigned num(static_cast<const AttributeVector *>(this)->get(doc, v, sz)); for(unsigned i(0); i < num; i++) { char tmp[32]; snprintf(tmp, sizeof(tmp), "%" PRId64, v[i].getValue()); s[i] = WeightedString(tmp, v[i].getWeight()); } delete [] v; return num; }