From: Till T. <ro...@tt...> - 2012-05-13 13:28:16
|
Git commit b5c101970a674bd2417b140fa50b80e2f1d51044 by Till Theato. Committed on 13/05/2012 at 13:41. Pushed by theato into branch 'refactoring'. Fix build and typo. M +1 -1 src/effects/abstracteffectlist.cpp M +2 -3 src/effects/effectdevice.cpp M +4 -3 src/effects/effectrepository.cpp M +3 -3 src/effects/effectrepository.h http://commits.kde.org/kdenlive/b5c101970a674bd2417b140fa50b80e2f1d51044 diff --git a/src/effects/abstracteffectlist.cpp b/src/effects/abstracteffectlist.cpp index cebf059..5cadf8e 100644 --- a/src/effects/abstracteffectlist.cpp +++ b/src/effects/abstracteffectlist.cpp @@ -14,7 +14,7 @@ the Free Software Foundation, either version 3 of the License, or #include "effect.h" -AbstractEffectList::AbstractEffectList(AbstractEffectList *parent, EffectRepository *repository) : +AbstractEffectList::AbstractEffectList(EffectRepository *repository, AbstractEffectList *parent) : EffectSystemItem(parent), m_repository(repository) { diff --git a/src/effects/effectdevice.cpp b/src/effects/effectdevice.cpp index 4456639..f5eb864 100644 --- a/src/effects/effectdevice.cpp +++ b/src/effects/effectdevice.cpp @@ -17,9 +17,8 @@ the Free Software Foundation, either version 3 of the License, or EffectDevice::EffectDevice(Mlt::Service service, EffectRepository *repository, QWidget *propertiesViewMainWidget) : - AbstractEffectList(m_repository), - m_service(service), - m_repository(repository) + AbstractEffectList(repository), + m_service(service) { m_viewHandler->setView(EffectPropertiesView, propertiesViewMainWidget); } diff --git a/src/effects/effectrepository.cpp b/src/effects/effectrepository.cpp index f602d41..af40a3e 100644 --- a/src/effects/effectrepository.cpp +++ b/src/effects/effectrepository.cpp @@ -45,6 +45,7 @@ void EffectRepository::initRepository() Mlt::Repository *repository = Mlt::Factory::init(); if (!repository) { + kWarning() << "MLT repository could not be loaded!!!"; // TODO: error msg return; } @@ -120,7 +121,7 @@ void EffectRepository::initRepository() } } -AbstractParameterDescription* EffectRepository::newParameterDescription(QString type) +AbstractParameterDescription* EffectRepository::newParameterDescription(const QString &type) { if(m_parameterPlugins.contains(type)) { return m_parameterPlugins.value(type)->create<AbstractParameterDescription>(); @@ -128,7 +129,7 @@ AbstractParameterDescription* EffectRepository::newParameterDescription(QString return NULL; } -AbstractEffectRepositoryItem* EffectRepository::effectDescription(QString id) +AbstractEffectRepositoryItem* EffectRepository::effectDescription(const QString &id) { if (m_effects.contains(id)) { return m_effects.value(id); @@ -147,7 +148,7 @@ void EffectRepository::getNamesFromProperties(Mlt::Properties* properties, QStri delete properties; } -void EffectRepository::applyBlacklist(QString filename, QStringList& list) const +void EffectRepository::applyBlacklist(const QString &filename, QStringList& list) const { QFile file(KStandardDirs::locate("appdata", filename)); if (file.open(QIODevice::ReadOnly)) { diff --git a/src/effects/effectrepository.h b/src/effects/effectrepository.h index 6ff08c9..8fe9098 100644 --- a/src/effects/effectrepository.h +++ b/src/effects/effectrepository.h @@ -47,18 +47,18 @@ public: * @brief Returns an empty parameter description as received from the factory of its plugin. * @param type type of the parameter for which the description should be received */ - AbstractParameterDescription *newParameterDescription(QString type); + AbstractParameterDescription *newParameterDescription(const QString &type); /** * @brief Returns a pointer to the requested effect description. * @param id name/kdenlive internal id of the effect whose description should be received */ - AbstractEffectRepositoryItem *effectDescription(QString id); + AbstractEffectRepositoryItem *effectDescription(const QString &id); private: void initRepository(); void getNamesFromProperties(Mlt::Properties *properties, QStringList &names) const; - void applyBlacklist(QString filename, QStringList &list) const; + void applyBlacklist(const QString &filename, QStringList &list) const; void loadParameterPlugins(); QMap <QString, AbstractEffectRepositoryItem*> m_effects; |