# HG changeset patch # User Chris Cannam # Date 1446550447 0 # Node ID a2dbedc0cfee98e45d9cbd82a6a0b058a9cea849 # Parent 1cc96e03a903c36f2f9496532fff616c85a22b80 Make it possible to report that a transform is of unknown type (e.g. invalid transform id, user mixed up filename and transform id, etc) diff -r 1cc96e03a903 -r a2dbedc0cfee transform/Transform.cpp --- a/transform/Transform.cpp Tue Sep 01 17:05:32 2015 +0100 +++ b/transform/Transform.cpp Tue Nov 03 11:34:07 2015 +0000 @@ -18,6 +18,7 @@ #include "plugin/PluginIdentifier.h" #include "plugin/FeatureExtractionPluginFactory.h" +#include "plugin/RealTimePluginFactory.h" #include @@ -207,10 +208,10 @@ { if (FeatureExtractionPluginFactory::instanceFor(getPluginIdentifier())) { return FeatureExtraction; + } else if (RealTimePluginFactory::instanceFor(getPluginIdentifier())) { + return RealTimeEffect; } else { - // We don't have an unknown/invalid return value, so always - // return this - return RealTimeEffect; + return UnknownType; } } diff -r 1cc96e03a903 -r a2dbedc0cfee transform/Transform.h --- a/transform/Transform.h Tue Sep 01 17:05:32 2015 +0100 +++ b/transform/Transform.h Tue Nov 03 11:34:07 2015 +0000 @@ -67,7 +67,7 @@ void setIdentifier(TransformId id); TransformId getIdentifier() const; - enum Type { FeatureExtraction, RealTimeEffect }; + enum Type { FeatureExtraction, RealTimeEffect, UnknownType }; Type getType() const; QString getPluginIdentifier() const;