diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-14 09:05:42 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-08-14 09:06:31 +0200 |
commit | 5c23199d4e8ff21661dfa5aacc13149178e78cab (patch) | |
tree | 322aee61581d7c85f1ccb65e47d1e79eba1ba6c9 /tests/auto/tools | |
parent | 252bad7c589e03d3e12df02354b00a84d8e3159a (diff) | |
parent | c8d9b17367cfdcb034d11f8a168ca4ae3993e7c3 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
configure
mkspecs/macx-xcode/Info.plist.app
mkspecs/macx-xcode/Info.plist.lib
qmake/doc/qmake.qdocconf
src/corelib/global/qglobal.h
tests/auto/other/exceptionsafety/exceptionsafety.pro
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/rcc/tst_rcc.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/tools/rcc/tst_rcc.cpp b/tests/auto/tools/rcc/tst_rcc.cpp index d9ceb6ff6f..4089d53f3d 100644 --- a/tests/auto/tools/rcc/tst_rcc.cpp +++ b/tests/auto/tools/rcc/tst_rcc.cpp @@ -70,6 +70,9 @@ private slots: void binary(); void cleanupTestCase(); + +private: + QString m_rcc; }; void tst_rcc::initTestCase() @@ -77,6 +80,7 @@ void tst_rcc::initTestCase() // rcc uses a QHash to store files in the resource system. // we must force a certain hash order when testing or tst_rcc will fail, see QTBUG-25078 QVERIFY(qputenv("QT_RCC_TEST", "1")); + m_rcc = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/rcc"); } QString findExpectedFile(const QString &base) @@ -145,13 +149,12 @@ void tst_rcc::rcc() } // Launch - const QString command = QLatin1String("rcc"); QProcess process; - process.start(command, QStringList(qrcfile)); + process.start(m_rcc, QStringList(qrcfile)); if (!process.waitForFinished()) { const QString path = QString::fromLocal8Bit(qgetenv("PATH")); QString message = QString::fromLatin1("'%1' could not be found when run from '%2'. Path: '%3' "). - arg(command, QDir::currentPath(), path); + arg(m_rcc, QDir::currentPath(), path); QFAIL(qPrintable(message)); } const QChar cr = QLatin1Char('\r'); @@ -176,13 +179,14 @@ void tst_rcc::rcc() -static void createRccBinaryData(const QString &baseDir, const QString &qrcFileName, const QString &rccFileName) +static void createRccBinaryData(const QString &rcc, const QString &baseDir, + const QString &qrcFileName, const QString &rccFileName) { QString currentDir = QDir::currentPath(); QDir::setCurrent(baseDir); QProcess rccProcess; - rccProcess.start("rcc", QStringList() << "-binary" << "-o" << rccFileName << qrcFileName); + rccProcess.start(rcc, QStringList() << "-binary" << "-o" << rccFileName << qrcFileName); bool ok = rccProcess.waitForFinished(); if (!ok) { QString errorString = QString::fromLatin1("Could not start rcc (is it in PATH?): %1").arg(rccProcess.errorString()); @@ -262,7 +266,7 @@ void tst_rcc::binary_data() QFileInfo qrcFileInfo = iter.fileInfo(); QString absoluteBaseName = QFileInfo(qrcFileInfo.absolutePath(), qrcFileInfo.baseName()).absoluteFilePath(); QString rccFileName = absoluteBaseName + QLatin1String(".rcc"); - createRccBinaryData(dataPath, qrcFileInfo.absoluteFilePath(), rccFileName); + createRccBinaryData(m_rcc, dataPath, qrcFileInfo.absoluteFilePath(), rccFileName); QString localeFileName = absoluteBaseName + QLatin1String(".locale"); QFile localeFile(localeFileName); |