From: Jean-Baptiste Mardelle Date: Sat, 18 Dec 2010 11:26:33 +0000 (+0000) Subject: Fix scripts with special chars in render name: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e38a9c69552502be9d432d4e0699bff9a1557c68;p=kdenlive Fix scripts with special chars in render name: http://kdenlive.org/mantis/view.php?id=1926 svn path=/trunk/kdenlive/; revision=5180 --- 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('"')); } }