aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-09-02 09:28:28 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-09-02 09:28:28 +0000
commit37da09eeb4ac168217a0d05ae40adfd8c0f35e64 (patch)
treeb0893dc04fa317463c6f48a2a3744ce3623f1776 /tests/tests.cpp
parent8324556cfa55a0cc15ac19165dc48a1492aa43d0 (diff)
downloadqxmpp-37da09eeb4ac168217a0d05ae40adfd8c0f35e64.tar.gz
load test files from resources so the tests can be run from any path
Diffstat (limited to 'tests/tests.cpp')
-rw-r--r--tests/tests.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp
index 69f0cd2a..4ad3fc59 100644
--- a/tests/tests.cpp
+++ b/tests/tests.cpp
@@ -109,7 +109,8 @@ void TestUtils::testJid()
static void testMimeType(const QString &fileName, const QString fileType)
{
- QFile file(fileName);
+ // load file from resources
+ QFile file(":/" + fileName);
QCOMPARE(file.open(QIODevice::ReadOnly), true);
QCOMPARE(getImageType(file.readAll()), fileType);
file.close();