mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 19:37:09 +02:00
Access private variable directly instead of using getter
This commit is contained in:
@@ -317,8 +317,10 @@ JSResolver::artists( const Tomahawk::collection_ptr& collection )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_D( const JSResolver );
|
||||||
|
|
||||||
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
||||||
!capabilities().testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
!d->capabilities.testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
||||||
{
|
{
|
||||||
emit artistsFound( QList< Tomahawk::artist_ptr >() );
|
emit artistsFound( QList< Tomahawk::artist_ptr >() );
|
||||||
return;
|
return;
|
||||||
@@ -351,8 +353,10 @@ JSResolver::albums( const Tomahawk::collection_ptr& collection, const Tomahawk::
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_D( const JSResolver );
|
||||||
|
|
||||||
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
||||||
!capabilities().testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
!d->capabilities.testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
||||||
{
|
{
|
||||||
emit albumsFound( QList< Tomahawk::album_ptr >() );
|
emit albumsFound( QList< Tomahawk::album_ptr >() );
|
||||||
return;
|
return;
|
||||||
@@ -386,8 +390,10 @@ JSResolver::tracks( const Tomahawk::collection_ptr& collection, const Tomahawk::
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_D( const JSResolver );
|
||||||
|
|
||||||
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
if ( !m_collections.contains( collection->name() ) || //if the collection doesn't belong to this resolver
|
||||||
!capabilities().testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
!d->capabilities.testFlag( Browsable ) ) //or this resolver doesn't even support collections
|
||||||
{
|
{
|
||||||
emit tracksFound( QList< Tomahawk::query_ptr >() );
|
emit tracksFound( QList< Tomahawk::query_ptr >() );
|
||||||
return;
|
return;
|
||||||
@@ -449,7 +455,9 @@ JSResolver::lookupUrl( const QString& url )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !capabilities().testFlag( UrlLookup ) )
|
Q_D( const JSResolver );
|
||||||
|
|
||||||
|
if ( !d->capabilities.testFlag( UrlLookup ) )
|
||||||
{
|
{
|
||||||
emit informationFound( url, QSharedPointer<QObject>() );
|
emit informationFound( url, QSharedPointer<QObject>() );
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user