mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
C++11 style fixes
This commit is contained in:
@@ -158,7 +158,7 @@ ACLJobDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QSt
|
|||||||
|
|
||||||
|
|
||||||
ACLJobItem::ACLJobItem( ACLRegistry::User user, const QString &username )
|
ACLJobItem::ACLJobItem( ACLRegistry::User user, const QString &username )
|
||||||
: m_delegate( 0 )
|
: m_delegate( nullptr )
|
||||||
, m_user( user )
|
, m_user( user )
|
||||||
, m_username( username )
|
, m_username( username )
|
||||||
{
|
{
|
||||||
|
@@ -34,20 +34,20 @@ class DLLEXPORT ACLJobDelegate : public QStyledItemDelegate
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ACLJobDelegate ( QObject* parent = 0 );
|
explicit ACLJobDelegate ( QObject* parent = nullptr );
|
||||||
virtual ~ACLJobDelegate();
|
virtual ~ACLJobDelegate();
|
||||||
|
|
||||||
virtual void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const override;
|
||||||
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const override;
|
||||||
|
|
||||||
virtual void emitSizeHintChanged( const QModelIndex &index );
|
void emitSizeHintChanged( const QModelIndex &index );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void update( const QModelIndex& idx );
|
void update( const QModelIndex& idx );
|
||||||
void aclResult( Tomahawk::ACLStatus::Type result );
|
void aclResult( Tomahawk::ACLStatus::Type result );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
|
bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void drawRoundedButton( QPainter* painter, const QRect& btnRect, bool red = false ) const;
|
void drawRoundedButton( QPainter* painter, const QRect& btnRect, bool red = false ) const;
|
||||||
@@ -65,21 +65,21 @@ public:
|
|||||||
explicit ACLJobItem( ACLRegistry::User user, const QString &username );
|
explicit ACLJobItem( ACLRegistry::User user, const QString &username );
|
||||||
virtual ~ACLJobItem();
|
virtual ~ACLJobItem();
|
||||||
|
|
||||||
virtual int weight() const { return 99; }
|
int weight() const override { return 99; }
|
||||||
|
|
||||||
virtual QString rightColumnText() const { return QString(); }
|
QString rightColumnText() const override { return QString(); }
|
||||||
virtual QString mainText() const { return QString(); }
|
QString mainText() const override { return QString(); }
|
||||||
virtual QPixmap icon() const { return QPixmap(); }
|
QPixmap icon() const override { return QPixmap(); }
|
||||||
virtual QString type() const { return "acljob"; }
|
QString type() const override { return "acljob"; }
|
||||||
|
|
||||||
virtual int concurrentJobLimit() const { return 3; }
|
int concurrentJobLimit() const override { return 3; }
|
||||||
|
|
||||||
virtual bool hasCustomDelegate() const { return true; }
|
bool hasCustomDelegate() const override { return true; }
|
||||||
virtual void createDelegate( QObject* parent = 0 );
|
void createDelegate( QObject* parent = nullptr ) override;
|
||||||
virtual QStyledItemDelegate* customDelegate() const { return m_delegate; }
|
QStyledItemDelegate* customDelegate() const override { return m_delegate; }
|
||||||
|
|
||||||
virtual ACLRegistry::User user() const { return m_user; }
|
ACLRegistry::User user() const { return m_user; }
|
||||||
virtual const QString& username() const { return m_username; }
|
const QString& username() const { return m_username; }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void userDecision( ACLRegistry::User user );
|
void userDecision( ACLRegistry::User user );
|
||||||
|
Reference in New Issue
Block a user