diff options
author | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-02-05 13:40:51 +0100 |
---|---|---|
committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-02-18 08:19:10 +0000 |
commit | 2d9c2a0b08d0c5f268faeb9b46ecd961456d042e (patch) | |
tree | a8ccc00e6f9d601dbb97a11aac365e7fecaa7f93 /src/testlib/qtestcase.h | |
parent | 3769f7c974e7df8d240e90cbaafae60626053d26 (diff) |
Testlib: Add function to extract files from resources to disk
Change-Id: I7ae1cdfea751a759298cf277e36cfef7a9c46edb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/testlib/qtestcase.h')
-rw-r--r-- | src/testlib/qtestcase.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index 9bfef80bac..45290de6de 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -209,6 +209,9 @@ do {\ QTest::qFindTestData(basepath, __FILE__, __LINE__) #endif +# define QEXTRACTTESTDATA(resourcePath) \ + QTest::qExtractTestData(resourcePath) + class QObject; class QTestData; @@ -245,6 +248,7 @@ namespace QTest Q_TESTLIB_EXPORT void ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern); #endif + Q_TESTLIB_EXPORT QString qExtractTestData(const QString &dirName); Q_TESTLIB_EXPORT QString qFindTestData(const char* basepath, const char* file = 0, int line = 0, const char* builddir = 0); Q_TESTLIB_EXPORT QString qFindTestData(const QString& basepath, const char* file = 0, int line = 0, const char* builddir = 0); |