Ejemplo n.º 1
0
TagCompleter::TagCompleter(LibraryBackend* backend, Playlist::Column column,
                           QLineEdit* editor)
    : QCompleter(editor), editor_(editor) {
  QFuture<TagCompletionModel*> future =
      QtConcurrent::run(&InitCompletionModel, backend, column);
  NewClosure(future, this, SLOT(ModelReady(QFuture<TagCompletionModel*>)),
             future);
}
Ejemplo n.º 2
0
TagCompleter::TagCompleter(LibraryBackend* backend, Playlist::Column column,
                           QLineEdit* editor)
    : QCompleter(editor), editor_(editor) {
  QFuture<TagCompletionModel*> future =
      QtConcurrent::run(&InitCompletionModel, backend, column);
  QFutureWatcher<TagCompletionModel*>* watcher =
      new QFutureWatcher<TagCompletionModel*>(this);
  watcher->setFuture(future);

  connect(watcher, SIGNAL(finished()), SLOT(ModelReady()));
}