diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-10-07 01:18:22 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-10-07 01:18:22 (GMT) |
commit | e1452cfc79a1fed77e646427092e181b7eb2ca2f (patch) | |
tree | 518a79bf19f78e202ef3343ddc209aef240d7b90 /tools/qmlviewer | |
parent | ba31a86ef17fc0c19887930c68ee30d71eefc4b3 (diff) | |
download | Qt-e1452cfc79a1fed77e646427092e181b7eb2ca2f.zip Qt-e1452cfc79a1fed77e646427092e181b7eb2ca2f.tar.gz Qt-e1452cfc79a1fed77e646427092e181b7eb2ca2f.tar.bz2 |
Fix portability of visual tests: fix filenames to be relative to base (URL).
Still not font-portable.
Diffstat (limited to 'tools/qmlviewer')
-rw-r--r-- | tools/qmlviewer/qfxtester.cpp | 4 | ||||
-rw-r--r-- | tools/qmlviewer/qfxtester.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/qmlviewer/qfxtester.cpp b/tools/qmlviewer/qfxtester.cpp index 7903fa9..a6a46eb 100644 --- a/tools/qmlviewer/qfxtester.cpp +++ b/tools/qmlviewer/qfxtester.cpp @@ -285,9 +285,9 @@ void QFxTester::updateCurrentTime(int msec) } if (options & QmlViewer::TestImages && !frame->image().isEmpty()) { - QImage goodImage(frame->image()); + QImage goodImage(frame->image().toLocalFile()); if (goodImage != img) { - QString reject(frame->image() + ".reject.png"); + QString reject(frame->image().toLocalFile() + ".reject.png"); qWarning() << "QFxTester: Image mismatch. Reject saved to:" << reject; img.save(reject); diff --git a/tools/qmlviewer/qfxtester.h b/tools/qmlviewer/qfxtester.h index bb027f6..52987db 100644 --- a/tools/qmlviewer/qfxtester.h +++ b/tools/qmlviewer/qfxtester.h @@ -44,7 +44,7 @@ class QFxVisualTestFrame : public QObject Q_OBJECT Q_PROPERTY(int msec READ msec WRITE setMsec) Q_PROPERTY(QString hash READ hash WRITE setHash) - Q_PROPERTY(QString image READ image WRITE setImage) + Q_PROPERTY(QUrl image READ image WRITE setImage) public: QFxVisualTestFrame() : m_msec(-1) {} @@ -54,13 +54,13 @@ public: QString hash() const { return m_hash; } void setHash(const QString &hash) { m_hash = hash; } - QString image() const { return m_image; } - void setImage(const QString &image) { m_image = image; } + QUrl image() const { return m_image; } + void setImage(const QUrl &image) { m_image = image; } private: int m_msec; QString m_hash; - QString m_image; + QUrl m_image; }; QML_DECLARE_TYPE(QFxVisualTestFrame) |