void DetailedListView::modifyEntries(Tellico::Data::EntryList entries_) { if(entries_.isEmpty()) { return; } sourceModel()->modifyEntries(entries_); setState(entries_, ModifiedState); if(!m_selectionChanging) { setEntriesSelected(entries_); } }
void DetailedListView::addEntries(Tellico::Data::EntryList entries_) { if(entries_.isEmpty()) { return; } sourceModel()->addEntries(entries_); if(!m_loadingCollection) { setState(entries_, NewState); if(!m_selectionChanging) { setEntriesSelected(entries_); } } }
// test grabbing cover art from coverartarchive.org void MusicBrainzFetcherTest::testCoverArt() { Tellico::Fetch::FetchRequest request(Tellico::Data::Collection::Album, Tellico::Fetch::Title, QLatin1String("Laulut ja tarinat")); Tellico::Fetch::Fetcher::Ptr fetcher(new Tellico::Fetch::MusicBrainzFetcher(this)); Tellico::Data::EntryList results = DO_FETCH1(fetcher, request, 1); QVERIFY(!results.isEmpty()); Tellico::Data::EntryPtr entry = results.at(0); QCOMPARE(entry->title(), QLatin1String("Laulut ja tarinat")); QEXPECT_FAIL("", "MusicBrainz covers from coverartarchive are failing", Abort); QVERIFY(!entry->field(QLatin1String("cover")).isEmpty()); }
bool ActionManager::cite(Tellico::Cite::CiteAction action_, Tellico::Data::EntryList entries_) { if(entries_.isEmpty()) { myDebug() << "no entries to cite"; return false; } if(m_action && m_action->type() != action_) { delete m_action; m_action = 0; } if(!m_action && !connect(action_)) { myDebug() << "unable to connect"; return false; } if(!m_action) { myDebug() << "no action found"; return false; } return m_action->cite(entries_); }
void DetailedListView::removeEntries(Tellico::Data::EntryList entries_) { if(entries_.isEmpty()) { return; } sourceModel()->removeEntries(entries_); }