1. Ivan Andrianov
  2. fftranscoder

Commits

Ivan Andrianov  committed 08c2a17

DecoderFinder refactoring.

  • Participants
  • Parent commits 50ccac8
  • Branches default

Comments (0)

Files changed (3)

File pysrc/fftranscoder/codecs/decoderfinder.sip

View file
  • Ignore whitespace
 %End
 
 public:
-    static FFTranscoder::Codecs::Decoder *
-        findDecoder(const QString &) /Factory/;
+    static FFTranscoder::Codecs::Decoder * findDecoder(QString) /Factory/;
 };
 
 };

File src/codecs/decoderfinder.cpp

View file
  • Ignore whitespace
 
 #include "decoderfinder.h"
 
-#include <QScopedPointer>
+#include <QtCore/qscopedpointer.h>
 
 #include "pluginloader.h"
 #include "decoderplugin.h"
 namespace Codecs
 {
 
-Decoder * DecoderFinder::findDecoder(const QString & fileName)
+Decoder * DecoderFinder::findDecoder(QString fileName)
 {
 	PluginLoader * pluginLoader = PluginLoader::instance();
 	QList<DecoderPlugin *> decoderPlugins = pluginLoader->decoderPlugins();

File src/codecs/decoderfinder.h

View file
  • Ignore whitespace
 #ifndef FFTRANSCODER_CODECS_DECODERFINDER_H
 #define FFTRANSCODER_CODECS_DECODERFINDER_H
 
-#include <QString>
+#include <QtCore/qstring.h>
 
 #include "global.h"
 
 	 * readMetaData() returns true. This method creates a decoder by each
 	 * decoder plugin and calls readMetaData() to determine if decoder is
 	 * appropriate. If the all decoder plugins failed the method returns NULL.
+	 * The decoder ownership is transfered to the caller.
 	 *
 	 */
-	static Decoder * findDecoder(const QString & fileName);
+	static Decoder * findDecoder(QString fileName);
 };
 
 }
 }
 
-#endif /* FFTRANSCODER_CODECS_DECODERFINDER_H */
+#endif