mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Don't return const values
This commit is contained in:
committed by
Dominik Schmidt
parent
d7517d8f6d
commit
4cac256ba7
@@ -33,8 +33,8 @@ class DLLEXPORT ResultProvider
|
|||||||
public:
|
public:
|
||||||
virtual ~ResultProvider();
|
virtual ~ResultProvider();
|
||||||
|
|
||||||
virtual const QString name() const = 0;
|
virtual QString name() const = 0;
|
||||||
virtual const QPixmap icon( const QSize& size ) const = 0;
|
virtual QPixmap icon( const QSize& size ) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ AccountConfigWidget::checkForErrors()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QStringList
|
QStringList
|
||||||
AccountConfigWidget::errors() const
|
AccountConfigWidget::errors() const
|
||||||
{
|
{
|
||||||
return m_errors;
|
return m_errors;
|
||||||
@@ -64,7 +64,7 @@ AccountConfigWidget::setDataWidgets( const QVariantList& dataWidgets )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QVariantMap
|
QVariantMap
|
||||||
AccountConfigWidget::readData()
|
AccountConfigWidget::readData()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -31,13 +31,13 @@ public:
|
|||||||
explicit AccountConfigWidget( QWidget* parent = nullptr );
|
explicit AccountConfigWidget( QWidget* parent = nullptr );
|
||||||
|
|
||||||
virtual void checkForErrors();
|
virtual void checkForErrors();
|
||||||
virtual const QStringList errors() const;
|
virtual QStringList errors() const;
|
||||||
virtual void resetErrors();
|
virtual void resetErrors();
|
||||||
|
|
||||||
virtual bool settingsValid() const;
|
virtual bool settingsValid() const;
|
||||||
|
|
||||||
void setDataWidgets( const QVariantList& dataWidgets );
|
void setDataWidgets( const QVariantList& dataWidgets );
|
||||||
const QVariantMap readData();
|
QVariantMap readData();
|
||||||
static QVariant widgetData( QWidget* widget, const QString& property );
|
static QVariant widgetData( QWidget* widget, const QString& property );
|
||||||
static void setWidgetData( const QVariant& value, QWidget* widget, const QString& property );
|
static void setWidgetData( const QVariant& value, QWidget* widget, const QString& property );
|
||||||
void fillDataInWidgets( const QVariantMap& data );
|
void fillDataInWidgets( const QVariantMap& data );
|
||||||
|
@@ -60,7 +60,7 @@ Collection::setWeakRef( const collection_wptr& weakRef )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const collection_wptr
|
collection_wptr
|
||||||
Collection::weakRef() const
|
Collection::weakRef() const
|
||||||
{
|
{
|
||||||
return m_ownRef;
|
return m_ownRef;
|
||||||
@@ -74,7 +74,7 @@ Collection::browseCapabilities() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
Collection::name() const
|
Collection::name() const
|
||||||
{
|
{
|
||||||
return m_name;
|
return m_name;
|
||||||
@@ -102,7 +102,7 @@ Collection::itemName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
Collection::icon( const QSize& size ) const
|
Collection::icon( const QSize& size ) const
|
||||||
{
|
{
|
||||||
return ImageRegistry::instance()->pixmap( RESPATH "images/collection.svg", size );
|
return ImageRegistry::instance()->pixmap( RESPATH "images/collection.svg", size );
|
||||||
@@ -126,7 +126,7 @@ Collection::isLocal() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const source_ptr
|
source_ptr
|
||||||
Collection::source() const
|
Collection::source() const
|
||||||
{
|
{
|
||||||
return m_source;
|
return m_source;
|
||||||
|
@@ -55,7 +55,7 @@ public:
|
|||||||
virtual ~Collection();
|
virtual ~Collection();
|
||||||
|
|
||||||
void setWeakRef( const collection_wptr& weakRef );
|
void setWeakRef( const collection_wptr& weakRef );
|
||||||
const collection_wptr weakRef() const;
|
collection_wptr weakRef() const;
|
||||||
|
|
||||||
enum BrowseCapability
|
enum BrowseCapability
|
||||||
{
|
{
|
||||||
@@ -74,12 +74,12 @@ public:
|
|||||||
ScriptCollectionType //performs operations through a resolver
|
ScriptCollectionType //performs operations through a resolver
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual const QString name() const override;
|
virtual QString name() const override;
|
||||||
virtual QString prettyName() const;
|
virtual QString prettyName() const;
|
||||||
virtual QString description() const;
|
virtual QString description() const;
|
||||||
virtual QString itemName() const;
|
virtual QString itemName() const;
|
||||||
virtual BackendType backendType() const { return NullCollectionType; }
|
virtual BackendType backendType() const { return NullCollectionType; }
|
||||||
virtual const QPixmap icon( const QSize& size ) const override;
|
virtual QPixmap icon( const QSize& size ) const override;
|
||||||
virtual QPixmap bigIcon() const; //for the ViewPage header
|
virtual QPixmap bigIcon() const; //for the ViewPage header
|
||||||
|
|
||||||
virtual bool isOnline() const = 0;
|
virtual bool isOnline() const = 0;
|
||||||
@@ -142,7 +142,7 @@ public slots:
|
|||||||
void delTracks( const QList<unsigned int>& fileids );
|
void delTracks( const QList<unsigned int>& fileids );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const source_ptr source() const;
|
source_ptr source() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onSynced();
|
void onSynced();
|
||||||
|
@@ -204,7 +204,7 @@ DatabaseCollection::trackCount() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
DatabaseCollection::icon( const QSize& size ) const
|
DatabaseCollection::icon( const QSize& size ) const
|
||||||
{
|
{
|
||||||
return source()->avatar( TomahawkUtils::RoundedCorners, size, true );
|
return source()->avatar( TomahawkUtils::RoundedCorners, size, true );
|
||||||
|
@@ -63,7 +63,7 @@ public:
|
|||||||
Tomahawk::TracksRequest* requestTracks( const Tomahawk::album_ptr& album ) override;
|
Tomahawk::TracksRequest* requestTracks( const Tomahawk::album_ptr& album ) override;
|
||||||
|
|
||||||
int trackCount() const override;
|
int trackCount() const override;
|
||||||
const QPixmap icon( const QSize& size ) const override;
|
QPixmap icon( const QSize& size ) const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void addTracks( const QList<QVariant>& newitems );
|
virtual void addTracks( const QList<QVariant>& newitems );
|
||||||
|
@@ -77,7 +77,7 @@ DatabaseResolver::gotArtists( const Tomahawk::QID qid, QList< Tomahawk::artist_p
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
DatabaseResolver::name() const
|
DatabaseResolver::name() const
|
||||||
{
|
{
|
||||||
return QString( "DatabaseResolver" );
|
return QString( "DatabaseResolver" );
|
||||||
|
@@ -33,7 +33,7 @@ Q_OBJECT
|
|||||||
public:
|
public:
|
||||||
explicit DatabaseResolver( int weight );
|
explicit DatabaseResolver( int weight );
|
||||||
|
|
||||||
const QString name() const override;
|
QString name() const override;
|
||||||
virtual unsigned int weight() const { return m_weight; }
|
virtual unsigned int weight() const { return m_weight; }
|
||||||
virtual unsigned int timeout() const { return 0; }
|
virtual unsigned int timeout() const { return 0; }
|
||||||
|
|
||||||
|
@@ -150,7 +150,7 @@ JSAccount::startJob( ScriptJob* scriptJob )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QVariant
|
QVariant
|
||||||
JSAccount::syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments )
|
JSAccount::syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments )
|
||||||
{
|
{
|
||||||
QString eval = QString(
|
QString eval = QString(
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
JSAccount( const QString& name );
|
JSAccount( const QString& name );
|
||||||
|
|
||||||
void startJob( ScriptJob* scriptJob ) override;
|
void startJob( ScriptJob* scriptJob ) override;
|
||||||
const QVariant syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments ) override;
|
QVariant syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments ) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Evaluate JavaScript on the WebKit thread
|
* Evaluate JavaScript on the WebKit thread
|
||||||
|
@@ -116,7 +116,7 @@ JSResolver::capabilities() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
JSResolver::name() const
|
JSResolver::name() const
|
||||||
{
|
{
|
||||||
Q_D( const JSResolver );
|
Q_D( const JSResolver );
|
||||||
@@ -125,7 +125,7 @@ JSResolver::name() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
JSResolver::icon( const QSize& size ) const
|
JSResolver::icon( const QSize& size ) const
|
||||||
{
|
{
|
||||||
Q_D( const JSResolver );
|
Q_D( const JSResolver );
|
||||||
|
@@ -55,8 +55,8 @@ public:
|
|||||||
|
|
||||||
Capabilities capabilities() const override;
|
Capabilities capabilities() const override;
|
||||||
|
|
||||||
const QString name() const override;
|
QString name() const override;
|
||||||
const QPixmap icon( const QSize& size ) const override;
|
QPixmap icon( const QSize& size ) const override;
|
||||||
unsigned int weight() const override;
|
unsigned int weight() const override;
|
||||||
unsigned int timeout() const override;
|
unsigned int timeout() const override;
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
Tomahawk::Resolver::icon( const QSize& ) const
|
Tomahawk::Resolver::icon( const QSize& ) const
|
||||||
{
|
{
|
||||||
return QPixmap();
|
return QPixmap();
|
||||||
|
@@ -47,7 +47,7 @@ public:
|
|||||||
virtual unsigned int weight() const = 0;
|
virtual unsigned int weight() const = 0;
|
||||||
virtual unsigned int timeout() const = 0;
|
virtual unsigned int timeout() const = 0;
|
||||||
|
|
||||||
virtual const QPixmap icon( const QSize& size ) const override;
|
virtual QPixmap icon( const QSize& size ) const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void resolve( const Tomahawk::query_ptr& query ) = 0;
|
virtual void resolve( const Tomahawk::query_ptr& query ) = 0;
|
||||||
|
@@ -81,7 +81,7 @@ ScriptAccount::isStopped()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
ScriptAccount::name() const
|
ScriptAccount::name() const
|
||||||
{
|
{
|
||||||
return m_name;
|
return m_name;
|
||||||
@@ -95,7 +95,7 @@ ScriptAccount::setIcon(const QPixmap& icon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
ScriptAccount::icon() const
|
ScriptAccount::icon() const
|
||||||
{
|
{
|
||||||
return m_icon;
|
return m_icon;
|
||||||
@@ -109,7 +109,7 @@ ScriptAccount::setFilePath( const QString& filePath )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
ScriptAccount::filePath() const
|
ScriptAccount::filePath() const
|
||||||
{
|
{
|
||||||
return m_filePath;
|
return m_filePath;
|
||||||
@@ -335,7 +335,7 @@ ScriptAccount::parseResultVariantList( const QVariantList& reslist )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QSharedPointer< ScriptCollection >
|
QSharedPointer< ScriptCollection >
|
||||||
ScriptAccount::scriptCollection( const QString& id ) const
|
ScriptAccount::scriptCollection( const QString& id ) const
|
||||||
{
|
{
|
||||||
return m_collectionFactory->scriptPlugins().value( id );
|
return m_collectionFactory->scriptPlugins().value( id );
|
||||||
|
@@ -54,16 +54,16 @@ public:
|
|||||||
|
|
||||||
bool isStopped();
|
bool isStopped();
|
||||||
|
|
||||||
const QString name() const;
|
QString name() const;
|
||||||
|
|
||||||
void setIcon( const QPixmap& icon );
|
void setIcon( const QPixmap& icon );
|
||||||
const QPixmap icon() const;
|
QPixmap icon() const;
|
||||||
|
|
||||||
void setFilePath( const QString& filePath );
|
void setFilePath( const QString& filePath );
|
||||||
const QString filePath() const;
|
QString filePath() const;
|
||||||
|
|
||||||
ScriptJob* invoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments );
|
ScriptJob* invoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments );
|
||||||
virtual const QVariant syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments ) = 0;
|
virtual QVariant syncInvoke( const scriptobject_ptr& scriptObject, const QString& methodName, const QVariantMap& arguments ) = 0;
|
||||||
|
|
||||||
virtual void startJob( ScriptJob* scriptJob ) = 0;
|
virtual void startJob( ScriptJob* scriptJob ) = 0;
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ public:
|
|||||||
|
|
||||||
QList< Tomahawk::result_ptr > parseResultVariantList( const QVariantList& reslist );
|
QList< Tomahawk::result_ptr > parseResultVariantList( const QVariantList& reslist );
|
||||||
|
|
||||||
const QSharedPointer< ScriptCollection > scriptCollection( const QString& id ) const;
|
QSharedPointer< ScriptCollection > scriptCollection( const QString& id ) const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onJobDeleted( const QString& jobId );
|
void onJobDeleted( const QString& jobId );
|
||||||
|
@@ -121,7 +121,7 @@ ScriptCollection::setIcon( const QPixmap& icon )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
ScriptCollection::icon( const QSize& size ) const
|
ScriptCollection::icon( const QSize& size ) const
|
||||||
{
|
{
|
||||||
if ( !size.isEmpty() && !m_icon.isNull() )
|
if ( !size.isEmpty() && !m_icon.isNull() )
|
||||||
@@ -211,7 +211,7 @@ ScriptCollection::trackCount() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QVariantMap
|
QVariantMap
|
||||||
ScriptCollection::readMetaData()
|
ScriptCollection::readMetaData()
|
||||||
{
|
{
|
||||||
return scriptObject()->syncInvoke( "collection" ).toMap();
|
return scriptObject()->syncInvoke( "collection" ).toMap();
|
||||||
|
@@ -74,7 +74,7 @@ public:
|
|||||||
|
|
||||||
void fetchIcon( const QString& iconUrl );
|
void fetchIcon( const QString& iconUrl );
|
||||||
void setIcon( const QPixmap& icon );
|
void setIcon( const QPixmap& icon );
|
||||||
const QPixmap icon( const QSize& size ) const override;
|
QPixmap icon( const QSize& size ) const override;
|
||||||
QPixmap bigIcon() const override;
|
QPixmap bigIcon() const override;
|
||||||
|
|
||||||
void setDescription( const QString& text );
|
void setDescription( const QString& text );
|
||||||
@@ -87,7 +87,7 @@ public:
|
|||||||
void setTrackCount( int count );
|
void setTrackCount( int count );
|
||||||
int trackCount() const override;
|
int trackCount() const override;
|
||||||
|
|
||||||
const QVariantMap readMetaData();
|
QVariantMap readMetaData();
|
||||||
void parseMetaData();
|
void parseMetaData();
|
||||||
void parseMetaData( const QVariantMap& metadata );
|
void parseMetaData( const QVariantMap& metadata );
|
||||||
|
|
||||||
|
@@ -54,28 +54,28 @@ ScriptJob::error() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const scriptobject_ptr
|
scriptobject_ptr
|
||||||
ScriptJob::scriptObject() const
|
ScriptJob::scriptObject() const
|
||||||
{
|
{
|
||||||
return m_scriptObject;
|
return m_scriptObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
ScriptJob::id() const
|
ScriptJob::id() const
|
||||||
{
|
{
|
||||||
return m_id;
|
return m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QString
|
QString
|
||||||
ScriptJob::methodName() const
|
ScriptJob::methodName() const
|
||||||
{
|
{
|
||||||
return m_methodName;
|
return m_methodName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QVariantMap
|
QVariantMap
|
||||||
ScriptJob::arguments() const
|
ScriptJob::arguments() const
|
||||||
{
|
{
|
||||||
return m_arguments;
|
return m_arguments;
|
||||||
|
@@ -43,10 +43,10 @@ public:
|
|||||||
|
|
||||||
bool error() const;
|
bool error() const;
|
||||||
|
|
||||||
const QString id() const;
|
QString id() const;
|
||||||
const scriptobject_ptr scriptObject() const;
|
scriptobject_ptr scriptObject() const;
|
||||||
const QString methodName() const;
|
QString methodName() const;
|
||||||
const QVariantMap arguments() const;
|
QVariantMap arguments() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reportResults( const QVariantMap& data = QVariantMap() );
|
void reportResults( const QVariantMap& data = QVariantMap() );
|
||||||
|
@@ -43,7 +43,7 @@ ScriptObject::setWeakRef(const scriptobject_wptr& weakRef)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const scriptobject_wptr
|
scriptobject_wptr
|
||||||
ScriptObject::weakRef() const
|
ScriptObject::weakRef() const
|
||||||
{
|
{
|
||||||
Q_D( const ScriptObject );
|
Q_D( const ScriptObject );
|
||||||
@@ -61,7 +61,7 @@ ScriptObject::invoke( const QString& methodName, const QVariantMap& arguments )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QVariant
|
QVariant
|
||||||
ScriptObject::syncInvoke(const QString& methodName, const QVariantMap& arguments)
|
ScriptObject::syncInvoke(const QString& methodName, const QVariantMap& arguments)
|
||||||
{
|
{
|
||||||
Q_D( ScriptObject );
|
Q_D( ScriptObject );
|
||||||
|
@@ -45,14 +45,14 @@ public:
|
|||||||
QString id() const;
|
QString id() const;
|
||||||
|
|
||||||
void setWeakRef( const scriptobject_wptr& weakRef );
|
void setWeakRef( const scriptobject_wptr& weakRef );
|
||||||
const scriptobject_wptr weakRef() const;
|
scriptobject_wptr weakRef() const;
|
||||||
|
|
||||||
ScriptJob* invoke( const QString& methodName, const QVariantMap& arguments = QVariantMap() );
|
ScriptJob* invoke( const QString& methodName, const QVariantMap& arguments = QVariantMap() );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Avoid using this if possible, it's blocking and can only be used from the gui thread
|
* Avoid using this if possible, it's blocking and can only be used from the gui thread
|
||||||
*/
|
*/
|
||||||
const QVariant syncInvoke( const QString& methodName, const QVariantMap& arguments = QVariantMap() );
|
QVariant syncInvoke( const QString& methodName, const QVariantMap& arguments = QVariantMap() );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startJob( ScriptJob* scriptJob );
|
void startJob( ScriptJob* scriptJob );
|
||||||
|
@@ -32,7 +32,7 @@ ScriptPlugin::~ScriptPlugin()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const scriptobject_ptr
|
scriptobject_ptr
|
||||||
ScriptPlugin::scriptObject() const
|
ScriptPlugin::scriptObject() const
|
||||||
{
|
{
|
||||||
return m_scriptObject;
|
return m_scriptObject;
|
||||||
|
@@ -35,7 +35,7 @@ public:
|
|||||||
ScriptPlugin( const scriptobject_ptr& object );
|
ScriptPlugin( const scriptobject_ptr& object );
|
||||||
virtual ~ScriptPlugin();
|
virtual ~ScriptPlugin();
|
||||||
|
|
||||||
const scriptobject_ptr scriptObject() const;
|
scriptobject_ptr scriptObject() const;
|
||||||
|
|
||||||
protected: // TODO: pimple
|
protected: // TODO: pimple
|
||||||
scriptobject_ptr m_scriptObject;
|
scriptobject_ptr m_scriptObject;
|
||||||
|
@@ -64,7 +64,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual const QSharedPointer<T> createPlugin( const scriptobject_ptr&, ScriptAccount* )
|
virtual QSharedPointer<T> createPlugin( const scriptobject_ptr&, ScriptAccount* )
|
||||||
{
|
{
|
||||||
return QSharedPointer<T>();
|
return QSharedPointer<T>();
|
||||||
}
|
}
|
||||||
|
@@ -555,7 +555,7 @@ ScriptResolver::setIcon( const QPixmap& icon )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QPixmap
|
QPixmap
|
||||||
ScriptResolver::icon( const QSize& size ) const
|
ScriptResolver::icon( const QSize& size ) const
|
||||||
{
|
{
|
||||||
if ( !size.isEmpty() )
|
if ( !size.isEmpty() )
|
||||||
|
@@ -44,8 +44,8 @@ public:
|
|||||||
virtual ~ScriptResolver();
|
virtual ~ScriptResolver();
|
||||||
static ExternalResolver* factory( const QString& accountId, const QString& exe, const QStringList& );
|
static ExternalResolver* factory( const QString& accountId, const QString& exe, const QStringList& );
|
||||||
|
|
||||||
const QString name() const Q_DECL_OVERRIDE { return m_name; }
|
QString name() const Q_DECL_OVERRIDE { return m_name; }
|
||||||
const QPixmap icon( const QSize& size ) const Q_DECL_OVERRIDE;
|
QPixmap icon( const QSize& size ) const Q_DECL_OVERRIDE;
|
||||||
unsigned int weight() const Q_DECL_OVERRIDE { return m_weight; }
|
unsigned int weight() const Q_DECL_OVERRIDE { return m_weight; }
|
||||||
virtual unsigned int preference() const { return m_preference; }
|
virtual unsigned int preference() const { return m_preference; }
|
||||||
unsigned int timeout() const Q_DECL_OVERRIDE { return m_timeout; }
|
unsigned int timeout() const Q_DECL_OVERRIDE { return m_timeout; }
|
||||||
|
@@ -27,7 +27,8 @@ Tomahawk::SyncScriptJob::SyncScriptJob( const QVariantMap& resultData )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Tomahawk::SyncScriptJob::start()
|
void
|
||||||
|
Tomahawk::SyncScriptJob::start()
|
||||||
{
|
{
|
||||||
QMetaObject::invokeMethod( this, "reportResults", Qt::QueuedConnection, Q_ARG( QVariantMap, m_data ) );
|
QMetaObject::invokeMethod( this, "reportResults", Qt::QueuedConnection, Q_ARG( QVariantMap, m_data ) );
|
||||||
}
|
}
|
||||||
|
@@ -37,7 +37,7 @@ void ScriptCollectionFactory::removePlugin( const QSharedPointer<ScriptCollectio
|
|||||||
SourceList::instance()->removeScriptCollection( collection );
|
SourceList::instance()->removeScriptCollection( collection );
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSharedPointer< ScriptCollection > ScriptCollectionFactory::createPlugin( const scriptobject_ptr& object, ScriptAccount* scriptAccount )
|
QSharedPointer< ScriptCollection > ScriptCollectionFactory::createPlugin( const scriptobject_ptr& object, ScriptAccount* scriptAccount )
|
||||||
{
|
{
|
||||||
const QVariantMap collectionInfo = object->syncInvoke( "collection" ).toMap();
|
const QVariantMap collectionInfo = object->syncInvoke( "collection" ).toMap();
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ class ScriptCollection;
|
|||||||
|
|
||||||
class DLLEXPORT ScriptCollectionFactory : public ScriptPluginFactory< ScriptCollection >
|
class DLLEXPORT ScriptCollectionFactory : public ScriptPluginFactory< ScriptCollection >
|
||||||
{
|
{
|
||||||
const QSharedPointer< ScriptCollection > createPlugin( const scriptobject_ptr&, ScriptAccount* ) override;
|
QSharedPointer< ScriptCollection > createPlugin( const scriptobject_ptr&, ScriptAccount* ) override;
|
||||||
void addPlugin( const QSharedPointer< ScriptCollection >& scriptPlugin ) const override;
|
void addPlugin( const QSharedPointer< ScriptCollection >& scriptPlugin ) const override;
|
||||||
void removePlugin( const QSharedPointer< ScriptCollection >& scriptPlugin ) const override;
|
void removePlugin( const QSharedPointer< ScriptCollection >& scriptPlugin ) const override;
|
||||||
};
|
};
|
||||||
|
@@ -32,7 +32,7 @@ void ScriptInfoPluginFactory::removePlugin( const QSharedPointer< ScriptInfoPlug
|
|||||||
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin.data() );
|
Tomahawk::InfoSystem::InfoSystem::instance()->removeInfoPlugin( infoPlugin.data() );
|
||||||
}
|
}
|
||||||
|
|
||||||
const QSharedPointer< ScriptInfoPlugin > ScriptInfoPluginFactory::createPlugin( const scriptobject_ptr& object, ScriptAccount* scriptAccount )
|
QSharedPointer< ScriptInfoPlugin > ScriptInfoPluginFactory::createPlugin( const scriptobject_ptr& object, ScriptAccount* scriptAccount )
|
||||||
{
|
{
|
||||||
// create infoplugin instance
|
// create infoplugin instance
|
||||||
ScriptInfoPlugin* scriptInfoPlugin = new ScriptInfoPlugin( object, scriptAccount->name() );
|
ScriptInfoPlugin* scriptInfoPlugin = new ScriptInfoPlugin( object, scriptAccount->name() );
|
||||||
|
@@ -30,7 +30,7 @@ class ScriptAccount;
|
|||||||
|
|
||||||
class DLLEXPORT ScriptInfoPluginFactory : public ScriptPluginFactory< ScriptInfoPlugin >
|
class DLLEXPORT ScriptInfoPluginFactory : public ScriptPluginFactory< ScriptInfoPlugin >
|
||||||
{
|
{
|
||||||
const QSharedPointer< ScriptInfoPlugin > createPlugin( const scriptobject_ptr&, ScriptAccount* ) override;
|
QSharedPointer< ScriptInfoPlugin > createPlugin( const scriptobject_ptr&, ScriptAccount* ) override;
|
||||||
void addPlugin( const QSharedPointer< ScriptInfoPlugin >& scriptPlugin ) const override;
|
void addPlugin( const QSharedPointer< ScriptInfoPlugin >& scriptPlugin ) const override;
|
||||||
void removePlugin( const QSharedPointer< ScriptInfoPlugin >& scriptPlugin ) const override;
|
void removePlugin( const QSharedPointer< ScriptInfoPlugin >& scriptPlugin ) const override;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user