mirror of https://code.videolan.org/videolan/vlc
qt: don't inherit from QObject in MLAlbum
This commit is contained in:
parent
86947d17ae
commit
be020d5387
|
@ -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 ) )
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue