Use std::make_unique

This commit is contained in:
Jonas Kvinge
2021-06-21 15:40:25 +02:00
parent 99ba2c2e8b
commit ed09627fdb
21 changed files with 52 additions and 30 deletions

View File

@@ -2863,8 +2863,8 @@ void MainWindow::AutoCompleteTags() {
// Create the tag fetching stuff if it hasn't been already
if (!tag_fetcher_) {
tag_fetcher_.reset(new TagFetcher);
track_selection_dialog_.reset(new TrackSelectionDialog);
tag_fetcher_ = std::make_unique<TagFetcher>();
track_selection_dialog_ = std::make_unique<TrackSelectionDialog>();
track_selection_dialog_->set_save_on_close(true);
QObject::connect(tag_fetcher_.get(), &TagFetcher::ResultAvailable, track_selection_dialog_.get(), &TrackSelectionDialog::FetchTagFinished, Qt::QueuedConnection);