mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Remove virtual keyword from some functions.
These functions are not overloaded at the moment in any child class but some of them are called very often which adds a significant overhead. If really needed they should be reverted to virtual when we actually overload them.
This commit is contained in:
parent
bd09c7733e
commit
1f5a3d8d25
@ -43,7 +43,7 @@ public:
|
||||
|
||||
virtual QString guid() const;
|
||||
|
||||
virtual PlayableModel* sourceModel() const { return m_model; }
|
||||
PlayableModel* sourceModel() const { return m_model; }
|
||||
virtual void setSourcePlayableModel( PlayableModel* sourceModel );
|
||||
virtual void setSourceModel( QAbstractItemModel* model );
|
||||
|
||||
@ -59,18 +59,18 @@ public:
|
||||
virtual void removeIndexes( const QModelIndexList& indexes );
|
||||
virtual void removeIndexes( const QList< QPersistentModelIndex >& indexes );
|
||||
|
||||
virtual bool showOfflineResults() const { return m_showOfflineResults; }
|
||||
virtual void setShowOfflineResults( bool b );
|
||||
bool showOfflineResults() const { return m_showOfflineResults; }
|
||||
void setShowOfflineResults( bool b );
|
||||
|
||||
virtual bool hideDupeItems() const { return m_hideDupeItems; }
|
||||
virtual void setHideDupeItems( bool b );
|
||||
bool hideDupeItems() const { return m_hideDupeItems; }
|
||||
void setHideDupeItems( bool b );
|
||||
|
||||
virtual int maxVisibleItems() const { return m_maxVisibleItems; }
|
||||
virtual void setMaxVisibleItems( int items );
|
||||
int maxVisibleItems() const { return m_maxVisibleItems; }
|
||||
void setMaxVisibleItems( int items );
|
||||
|
||||
virtual PlayableItem* itemFromIndex( const QModelIndex& index ) const { return sourceModel()->itemFromIndex( index ); }
|
||||
virtual PlayableItem* itemFromQuery( const Tomahawk::query_ptr& query ) const { return sourceModel()->itemFromQuery( query ); }
|
||||
virtual PlayableItem* itemFromResult( const Tomahawk::result_ptr& result ) const { return sourceModel()->itemFromResult( result ); }
|
||||
PlayableItem* itemFromIndex( const QModelIndex& index ) const { return sourceModel()->itemFromIndex( index ); }
|
||||
PlayableItem* itemFromQuery( const Tomahawk::query_ptr& query ) const { return sourceModel()->itemFromQuery( query ); }
|
||||
PlayableItem* itemFromResult( const Tomahawk::result_ptr& result ) const { return sourceModel()->itemFromResult( result ); }
|
||||
|
||||
virtual Tomahawk::playlistinterface_ptr playlistInterface() const;
|
||||
void setPlaylistInterface( const Tomahawk::playlistinterface_ptr& playlistInterface );
|
||||
@ -103,7 +103,7 @@ signals:
|
||||
void selectRequest( const QPersistentModelIndex& index );
|
||||
|
||||
protected:
|
||||
virtual bool filterAcceptsRow( int sourceRow, const QModelIndex& sourceParent ) const;
|
||||
bool filterAcceptsRow( int sourceRow, const QModelIndex& sourceParent ) const Q_DECL_OVERRIDE;
|
||||
virtual bool lessThan( const QModelIndex& left, const QModelIndex& right ) const;
|
||||
|
||||
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user