X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdocumentvalidator.h;h=fa9ab28826a7748e44d9ac6e1fb9cdd846d61183;hb=5d4746e4c3e8665de83e6d281dcd08a46cd22c31;hp=a4427b7f9040d418a91ba5b15e39bb2048976a68;hpb=41dece4cea069263ee17ab9d491964c1705fec6b;p=kdenlive diff --git a/src/documentvalidator.h b/src/documentvalidator.h index a4427b7f..fa9ab288 100644 --- a/src/documentvalidator.h +++ b/src/documentvalidator.h @@ -24,21 +24,31 @@ #include #include +#include + +class QScriptValue; + class DocumentValidator { public: - DocumentValidator(QDomDocument doc); + DocumentValidator(const QDomDocument &doc, const KUrl &documentUrl); bool isProject() const; bool validate(const double currentVersion); bool isModified() const; private: QDomDocument m_doc; + KUrl m_url; bool m_modified; bool upgrade(double version, const double currentVersion); - QStringList getInfoFromEffectName(const QString oldName); + QStringList getInfoFromEffectName(const QString &oldName); QString colorToString(const QColor& c); + /** @brief Updates effects that were created using a different version of the underlaying filter than the one installed. */ + void updateEffects(); + /** @brief Updates the parameters according to the updateRules. + * @see the related in README in effects/update */ + bool updateEffectParameters(const QDomNodeList ¶meters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion); }; #endif