From 28c8570d38fe1a5f57300a48668506a6235a9081 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 8 Oct 2009 13:55:39 +1000 Subject: Fix relative-URLs of test scripts --- tools/qmlviewer/qfxtester.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index a6a46eb..87ab43b 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -140,7 +140,8 @@ void QFxTester::run() void QFxTester::save() { QString filename = m_script + QLatin1String(".qml"); - QDir saveDir = QFileInfo(filename).absoluteDir(); + QFileInfo filenameInfo(filename); + QDir saveDir = filenameInfo.absoluteDir(); saveDir.mkpath("."); QFile file(filename); @@ -160,7 +161,7 @@ void QFxTester::save() if (!fe.hash.isEmpty()) { ts << " hash: \"" << fe.hash.toHex() << "\"\n"; } else if (!fe.image.isNull()) { - QString filename = m_script + "." + QString::number(imgCount++) + ".png"; + QString filename = filenameInfo.baseName() + "." + QString::number(imgCount++) + ".png"; fe.image.save(filename); ts << " image: \"" << filename << "\"\n"; } -- cgit v0.12