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); }
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())); }