diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-26 09:59:48 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-05-26 10:00:47 (GMT) |
commit | 2eedb392048fdebbb29615345ea3716cebabd451 (patch) | |
tree | d76f24d8c9a9fb1723b74f22af2e4ee3a38f2985 /tests/auto | |
parent | e0dc3b88abc9c4bcd6c3710c458c4948e5b8a912 (diff) | |
download | Qt-2eedb392048fdebbb29615345ea3716cebabd451.zip Qt-2eedb392048fdebbb29615345ea3716cebabd451.tar.gz Qt-2eedb392048fdebbb29615345ea3716cebabd451.tar.bz2 |
tst_qxmlstream: fix in shadowbuild
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qxmlstream/qxmlstream.pro | 5 | ||||
-rw-r--r-- | tests/auto/qxmlstream/tst_qxmlstream.cpp | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/qxmlstream/qxmlstream.pro b/tests/auto/qxmlstream/qxmlstream.pro index ac03d42..f82a7b3 100644 --- a/tests/auto/qxmlstream/qxmlstream.pro +++ b/tests/auto/qxmlstream/qxmlstream.pro @@ -1,5 +1,5 @@ load(qttest_p4) -SOURCES += tst_qxmlstream.cpp +SOURCES += tst_qxmlstream.cpp QT = core xml network @@ -8,4 +8,7 @@ wince*|symbian*: { addFiles.sources = data XML-Test-Suite addFiles.path = . DEPLOYMENT += addFiles + DEFINES += SRCDIR=\\\"\\\" +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qxmlstream/tst_qxmlstream.cpp b/tests/auto/qxmlstream/tst_qxmlstream.cpp index f93d4fc..7d5e3b7 100644 --- a/tests/auto/qxmlstream/tst_qxmlstream.cpp +++ b/tests/auto/qxmlstream/tst_qxmlstream.cpp @@ -57,7 +57,7 @@ Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour) -static const char *const catalogFile = "XML-Test-Suite/xmlconf/finalCatalog.xml"; +static const char *const catalogFile = SRCDIR "XML-Test-Suite/xmlconf/finalCatalog.xml"; static const int expectedRunCount = 1646; static const int expectedSkipCount = 532; @@ -527,8 +527,7 @@ class tst_QXmlStream: public QObject { Q_OBJECT public: - tst_QXmlStream() : m_handler(QUrl::fromLocalFile(QDir::currentPath() + QLatin1Char('/')) - .resolved(QUrl(QLatin1String(catalogFile)))) + tst_QXmlStream() : m_handler(QUrl::fromLocalFile(QLatin1String(catalogFile))) { } @@ -806,7 +805,7 @@ void tst_QXmlStream::testReader_data() const QTest::addColumn<QString>("xml"); QTest::addColumn<QString>("ref"); QDir dir; - dir.cd("data/"); + dir.cd(SRCDIR "data/"); foreach(QString filename , dir.entryList(QStringList() << "*.xml")) { QString reference = QFileInfo(filename).baseName() + ".ref"; QTest::newRow(dir.filePath(filename).toLatin1().data()) << dir.filePath(filename) << dir.filePath(reference); @@ -1201,7 +1200,7 @@ void tst_QXmlStream::crashInUTF16Codec() const QEventLoop eventLoop; QNetworkAccessManager networkManager; - QNetworkRequest request(QUrl::fromLocalFile(QLatin1String("data/051reduced.xml"))); + QNetworkRequest request(QUrl::fromLocalFile(QLatin1String(SRCDIR "data/051reduced.xml"))); QNetworkReply *const reply = networkManager.get(request); eventLoop.connect(reply, SIGNAL(finished()), SLOT(quit())); |