diff options
-rw-r--r-- | tools/qmlviewer/qfxtester.cpp | 5 |
1 files 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"; } |