Пример #1
0
void EditTagDialog::SetSongs(const SongList& s, const PlaylistItemList& items) {
  // Show the loading indicator
  if (!SetLoading(tr("Loading tracks") + "...")) return;

  data_.clear();
  playlist_items_ = items;
  ui_->song_list->clear();

  // Reload tags in the background
  QFuture<QList<Data>> future =
      QtConcurrent::run(this, &EditTagDialog::LoadData, s);
  QFutureWatcher<QList<Data>>* watcher = new QFutureWatcher<QList<Data>>(this);
  watcher->setFuture(future);
  connect(watcher, SIGNAL(finished()), SLOT(SetSongsFinished()));
}
Пример #2
0
void EditTagDialog::SetSongs(const SongList& s, const PlaylistItemList& items) {
  // Show the loading indicator
  if (!SetLoading(tr("Loading tracks") + "...")) return;

  data_.clear();
  playlist_items_ = items;
  ui_->song_list->clear();

  // Reload tags in the background
  QFuture<QList<Data>> future =
      QtConcurrent::run(this, &EditTagDialog::LoadData, s);
  NewClosure(future, this,
             SLOT(SetSongsFinished(QFuture<QList<EditTagDialog::Data>>)),
             future);
}