void CurrentTrackToolbar::handleAddActions() { clear(); Meta::TrackPtr track = The::engineController()->currentTrack(); foreach( QAction* action, The::globalCurrentTrackActions()->actions() ) addAction( action ); if( track ) { QScopedPointer< Capabilities::ActionsCapability > ac( track->create<Capabilities::ActionsCapability>() ); if( ac ) { QList<QAction *> currentTrackActions = ac->actions(); foreach( QAction *action, currentTrackActions ) { if( !action->parent() ) action->setParent( this ); addAction( action ); } } QScopedPointer< Capabilities::BookmarkThisCapability > btc( track->create<Capabilities::BookmarkThisCapability>() ); if( btc && btc->bookmarkAction() ) addAction( btc->bookmarkAction() ); } }
Code() { Xbyak::Label label; cmpss(xmm0, ptr[rip + label], 0); test(dword[rip + label], 33); bt(dword[rip + label ], 3); vblendpd(xmm0, dword[rip + label], 3); vpalignr(xmm0, qword[rip + label], 4); vextractf128(dword[rip + label], ymm3, 12); vperm2i128(ymm0, ymm1, qword[rip + label], 13); vcvtps2ph(ptr[rip + label], xmm2, 44); mov(dword[rip + label], 0x1234); shl(dword[rip + label], 3); shr(dword[rip + label], 1); shld(qword[rip + label], rax, 3); imul(rax, qword[rip + label], 21); rorx(rax, qword[rip + label], 21); test(dword[rip + label], 5); pextrq(ptr[rip + label], xmm0, 3); pinsrq(xmm2, ptr[rip + label], 5); pextrw(ptr[rip + label], xmm1, 4); adc(dword[rip + label], 0x12345); bt(byte[rip + label], 0x34); btc(word[rip + label], 0x34); btr(dword[rip + label], 0x34); rcl(dword[rip + label], 4); shld(qword[rip + label], rax, 4); palignr(mm0, ptr[rip + label], 4); aeskeygenassist(xmm3, ptr[rip + label], 4); vpcmpestrm(xmm2, ptr[rip + label], 7); ret(); L(label); dq(0x123456789abcdef0ull); };
AmarokUrl NavigationUrlGenerator::urlFromAlbum( Meta::AlbumPtr album ) { AmarokUrl url; QScopedPointer<Capabilities::BookmarkThisCapability> btc( album->create<Capabilities::BookmarkThisCapability>() ); if( btc ) { if( btc->isBookmarkable() ) { QString albumName = album->prettyName(); url.setCommand( "navigate" ); QString path = btc->browserName(); if ( !btc->collectionName().isEmpty() ) path += ( '/' + btc->collectionName() ); url.setPath( path ); QString filter; if ( btc->simpleFiltering() ) { filter = "\"" + albumName + "\""; } else { url.setArg( "levels", "album" ); QString artistName; if ( album->albumArtist() ) artistName = album->albumArtist()->prettyName(); filter = "album:\"" + albumName + "\""; if ( !artistName.isEmpty() ) filter += ( " AND artist:\"" + artistName + "\"" ); } url.setArg( "filter", filter ); if ( !btc->collectionName().isEmpty() ) url.setName( i18n( "Album \"%1\" from %2", albumName, btc->collectionName() ) ); else url.setName( i18n( "Album \"%1\"", albumName ) ); } } //debug() << "got url: " << url.url(); return url; }
AmarokUrl NavigationUrlGenerator::urlFromArtist( Meta::ArtistPtr artist ) { DEBUG_BLOCK AmarokUrl url; QScopedPointer<Capabilities::BookmarkThisCapability> btc( artist->create<Capabilities::BookmarkThisCapability>() ); if( btc ) { if( btc->isBookmarkable() ) { QString artistName = artist->prettyName(); url.setCommand( "navigate" ); QString path = btc->browserName(); if ( !btc->collectionName().isEmpty() ) path += ( '/' + btc->collectionName() ); url.setPath( path ); //debug() << "Path: " << url.path(); QString filter; if ( btc->simpleFiltering() ) { //for services only supporting simple filtering, do not try to set the sorting mode filter = "\"" + artistName + "\""; } else { url.setArg( "levels", "artist-album" ); filter = ( "artist:\"" + artistName + "\"" ); } url.setArg( "filter", filter ); if ( !btc->collectionName().isEmpty() ) url.setName( i18n( "Artist \"%1\" from %2", artistName, btc->collectionName() ) ); else url.setName( i18n( "Artist \"%1\"", artistName ) ); } } return url; }