Rewrite album cover loader
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
#ifndef ALBUMCOVERIMAGERESULT_H
|
||||
#define ALBUMCOVERIMAGERESULT_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
@@ -30,10 +28,7 @@
|
||||
|
||||
class AlbumCoverImageResult {
|
||||
public:
|
||||
explicit AlbumCoverImageResult(const QUrl &_cover_url = QUrl(),
|
||||
const QString &_mime_type = QString(),
|
||||
const QByteArray &_image_data = QByteArray(),
|
||||
const QImage &_image = QImage())
|
||||
explicit AlbumCoverImageResult(const QUrl &_cover_url = QUrl(), const QString &_mime_type = QString(), const QByteArray &_image_data = QByteArray(), const QImage &_image = QImage())
|
||||
: cover_url(_cover_url),
|
||||
mime_type(_mime_type),
|
||||
image_data(_image_data),
|
||||
@@ -47,7 +42,6 @@ class AlbumCoverImageResult {
|
||||
|
||||
bool is_valid() const { return !image_data.isNull() || !image.isNull(); }
|
||||
bool is_jpeg() const { return mime_type == "image/jpeg" && !image_data.isEmpty(); }
|
||||
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(AlbumCoverImageResult)
|
||||
|
||||
Reference in New Issue
Block a user