mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
little improvements to the last commit
This commit is contained in:
parent
d1d177769a
commit
e0ab8ae5f2
@ -35,17 +35,17 @@ CoverProviders::CoverProviders()
|
||||
#endif
|
||||
}
|
||||
|
||||
void CoverProviders::AddCoverProviderFactory(CoverProviderFactory* factory) {
|
||||
void CoverProviders::AddProviderFactory(CoverProviderFactory* factory) {
|
||||
{
|
||||
QMutexLocker locker(&mutex_);
|
||||
Q_UNUSED(locker);
|
||||
|
||||
cover_provider_factories_.append(factory);
|
||||
connect(factory, SIGNAL(destroyed()), SLOT(RemoveCoverProviderFactory()));
|
||||
connect(factory, SIGNAL(destroyed()), SLOT(RemoveProviderFactory()));
|
||||
}
|
||||
}
|
||||
|
||||
void CoverProviders::RemoveCoverProviderFactory() {
|
||||
void CoverProviders::RemoveProviderFactory() {
|
||||
// qobject_cast doesn't work here with factories created by python
|
||||
CoverProviderFactory* factory = static_cast<CoverProviderFactory*>(sender());
|
||||
|
||||
@ -59,7 +59,7 @@ void CoverProviders::RemoveCoverProviderFactory() {
|
||||
}
|
||||
}
|
||||
|
||||
const QList<CoverProvider*> CoverProviders::List(AlbumCoverFetcherSearch* parent) {
|
||||
QList<CoverProvider*> CoverProviders::List(AlbumCoverFetcherSearch* parent) {
|
||||
{
|
||||
QMutexLocker locker(&mutex_);
|
||||
Q_UNUSED(locker);
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
}
|
||||
|
||||
// Let's a cover provider factory to register itself in the repository.
|
||||
void AddCoverProviderFactory(CoverProviderFactory* factory);
|
||||
void AddProviderFactory(CoverProviderFactory* factory);
|
||||
|
||||
// Creates a list of cover providers, one for every registered factory. Providers that get created will
|
||||
// be children of the given AlbumCoverFetcherSearch's instance.
|
||||
@ -51,7 +51,7 @@ public:
|
||||
~CoverProviders() {}
|
||||
|
||||
private slots:
|
||||
void RemoveCoverProviderFactory();
|
||||
void RemoveProviderFactory();
|
||||
|
||||
private:
|
||||
CoverProviders();
|
||||
|
@ -457,9 +457,9 @@ return new PythonQtShell_CoverProviderFactory(parent); }
|
||||
|
||||
|
||||
|
||||
void PythonQtWrapper_CoverProviders::AddCoverProviderFactory(CoverProviders* theWrappedObject, CoverProviderFactory* factory)
|
||||
void PythonQtWrapper_CoverProviders::AddProviderFactory(CoverProviders* theWrappedObject, CoverProviderFactory* factory)
|
||||
{
|
||||
( theWrappedObject->AddCoverProviderFactory(factory));
|
||||
( theWrappedObject->AddProviderFactory(factory));
|
||||
}
|
||||
|
||||
bool PythonQtWrapper_CoverProviders::HasAnyProviderFactories(CoverProviders* theWrappedObject)
|
||||
@ -467,7 +467,7 @@ bool PythonQtWrapper_CoverProviders::HasAnyProviderFactories(CoverProviders* th
|
||||
return ( theWrappedObject->HasAnyProviderFactories());
|
||||
}
|
||||
|
||||
const QList<CoverProvider* > PythonQtWrapper_CoverProviders::List(CoverProviders* theWrappedObject, AlbumCoverFetcherSearch* parent)
|
||||
QList<CoverProvider* > PythonQtWrapper_CoverProviders::List(CoverProviders* theWrappedObject, AlbumCoverFetcherSearch* parent)
|
||||
{
|
||||
return ( theWrappedObject->List(parent));
|
||||
}
|
||||
|
@ -115,9 +115,9 @@ class PythonQtWrapper_CoverProviders : public QObject
|
||||
public:
|
||||
public slots:
|
||||
void delete_CoverProviders(CoverProviders* obj) { delete obj; }
|
||||
void AddCoverProviderFactory(CoverProviders* theWrappedObject, CoverProviderFactory* factory);
|
||||
void AddProviderFactory(CoverProviders* theWrappedObject, CoverProviderFactory* factory);
|
||||
bool HasAnyProviderFactories(CoverProviders* theWrappedObject);
|
||||
const QList<CoverProvider* > List(CoverProviders* theWrappedObject, AlbumCoverFetcherSearch* parent);
|
||||
QList<CoverProvider* > List(CoverProviders* theWrappedObject, AlbumCoverFetcherSearch* parent);
|
||||
CoverProviders* static_CoverProviders_instance();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user