void lastfm::TrackData::onLoveFinished() { try { XmlQuery lfm = static_cast<QNetworkReply*>(sender())->readAll(); if ( lfm.attribute( "status" ) == "ok") loved = true; } catch (...) { } emit loveToggled( loved ); }
void ShareDialog::onShared() { XmlQuery lfm; if ( lfm.parse( qobject_cast<QNetworkReply*>(sender()) ) ) { if ( lfm.attribute( "status" ) == "ok" ) close(); else { // TODO: display some kind of error message setEnabled( true ); } } else { // TODO: display some kind of error message setEnabled( true ); } }