]> git.sesse.net Git - kdenlive/blobdiff - src/renderwidget.cpp
Fix scripts with special chars in render name:
[kdenlive] / 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('"'));
                 }
             }