qt: don't inherit from QObject in MLAlbum

This commit is contained in:
Prince Gupta 2024-04-16 12:21:02 +05:30 committed by Steve Lhomme
parent 86947d17ae
commit be020d5387
2 changed files with 7 additions and 11 deletions

View File

@ -20,9 +20,8 @@
#include "util/vlctick.hpp"
MLAlbum::MLAlbum(const vlc_ml_album_t *_data, QObject *_parent)
: QObject( _parent )
, MLItem ( MLItemId( _data->i_id, VLC_ML_PARENT_ALBUM ) )
MLAlbum::MLAlbum(const vlc_ml_album_t *_data)
: MLItem ( MLItemId( _data->i_id, VLC_ML_PARENT_ALBUM ) )
, m_title ( QString::fromUtf8( _data->psz_title ) )
, m_releaseYear ( _data->i_year )
, m_shortSummary( QString::fromUtf8( _data->psz_summary ) )

View File

@ -18,7 +18,6 @@
#pragma once
#include <QObject>
#include <QString>
#include <QList>
#include <memory>
@ -27,12 +26,10 @@
class VLCTick;
class MLAlbum : public QObject, public MLItem
class MLAlbum : public MLItem
{
Q_OBJECT
public:
MLAlbum(const vlc_ml_album_t *_data, QObject *_parent = nullptr);
MLAlbum(const vlc_ml_album_t *_data);
QString getTitle() const;
unsigned int getReleaseYear() const;
@ -42,9 +39,9 @@ public:
unsigned int getNbTracks() const;
VLCTick getDuration() const;
Q_INVOKABLE QString getPresName() const;
Q_INVOKABLE QString getPresImage() const;
Q_INVOKABLE QString getPresInfo() const;
QString getPresName() const;
QString getPresImage() const;
QString getPresInfo() const;
private:
QString m_title;