From e38a9c69552502be9d432d4e0699bff9a1557c68 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Sat, 18 Dec 2010 11:26:33 +0000 Subject: [PATCH] Fix scripts with special chars in render name: http://kdenlive.org/mantis/view.php?id=1926 svn path=/trunk/kdenlive/; revision=5180 --- src/renderwidget.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/renderwidget.cpp b/src/renderwidget.cpp index fccfef86..db4f1046 100644 --- a/src/renderwidget.cpp +++ b/src/renderwidget.cpp @@ -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('"')); } } -- 2.39.2