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

@@ -21,6 +21,8 @@
#include "config.h"
#include <memory>
#include <QtGlobal>
#include <QWidget>
#include <QList>
@@ -535,7 +537,7 @@ void PlayingWidget::SearchCoverInProgress() {
downloading_covers_ = true;
// Show a spinner animation
spinner_animation_.reset(new QMovie(":/pictures/spinner.gif", QByteArray(), this));
spinner_animation_ = std::make_unique<QMovie>(":/pictures/spinner.gif", QByteArray(), this);
QObject::connect(spinner_animation_.get(), &QMovie::updated, this, &PlayingWidget::Update);
spinner_animation_->start();
update();