qt: don't inherit from QObject in MLArtist

This commit is contained in:
Prince Gupta 2024-04-16 13:20:13 +05:30 committed by Steve Lhomme
parent 0d379add7c
commit 170ba95826
2 changed files with 4 additions and 8 deletions

View File

@ -19,9 +19,8 @@
#include <cassert>
#include "mlartist.hpp"
MLArtist::MLArtist(const vlc_ml_artist_t* _data, QObject *_parent)
: QObject(_parent)
, MLItem ( MLItemId( _data->i_id, VLC_ML_PARENT_ARTIST ) )
MLArtist::MLArtist(const vlc_ml_artist_t* _data)
: MLItem ( MLItemId( _data->i_id, VLC_ML_PARENT_ARTIST ) )
, m_name ( QString::fromUtf8( _data->psz_name ) )
, m_shortBio( QString::fromUtf8( _data->psz_shortbio ) )
, m_cover ( QString::fromUtf8( _data->thumbnails[VLC_ML_THUMBNAIL_SMALL].psz_mrl ) )

View File

@ -19,7 +19,6 @@
#ifndef MLARTIST_HPP
#define MLARTIST_HPP
#include <QObject>
#include <QString>
#include <memory>
@ -31,12 +30,10 @@ extern "C" {
typedef struct vlc_ml_artist_t vlc_ml_artist_t;
};
class MLArtist : public QObject, public MLItem
class MLArtist : public MLItem
{
Q_OBJECT
public:
MLArtist(const vlc_ml_artist_t *_data, QObject *_parent = nullptr);
MLArtist(const vlc_ml_artist_t *_data);
QString getName() const;
QString getShortBio() const;