]> git.sesse.net Git - kdenlive/commitdiff
Fix scripts with special chars in render name:
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 18 Dec 2010 11:26:33 +0000 (11:26 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 18 Dec 2010 11:26:33 +0000 (11:26 +0000)
http://kdenlive.org/mantis/view.php?id=1926

svn path=/trunk/kdenlive/; revision=5180

src/renderwidget.cpp

index fccfef86767e6165f2d0a2807f332dbe685293c0..db4f10469220200bdce8315f2982690114eebff3 100644 (file)
@@ -1611,16 +1611,17 @@ void RenderWidget::parseScriptFiles()
         QString melt;
         QFile file(scriptpath.path());
         if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
-            while (!file.atEnd()) {
-                QByteArray line = file.readLine();
+            QTextStream stream(&file);
+            while (!stream.atEnd()) {
+                QString line = stream.readLine();
                 if (line.startsWith("TARGET=")) {
-                    target = QString(line).section("TARGET=", 1).simplified();
+                    target = line.section("TARGET=", 1).simplified();
                     target.remove(QChar('"'));
                 } else if (line.startsWith("RENDERER=")) {
-                    renderer = QString(line).section("RENDERER=", 1).simplified();
+                    renderer = line.section("RENDERER=", 1).simplified();
                     renderer.remove(QChar('"'));
                 } else if (line.startsWith("MELT=")) {
-                    melt = QString(line).section("MELT=", 1).simplified();
+                    melt = line.section("MELT=", 1).simplified();
                     melt.remove(QChar('"'));
                 }
             }