summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-22 20:13:50 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-22 20:21:19 +0200
commitabd3b8030cbcc50379578b88ce6019e338ff8597 (patch)
tree7a7acb89e594b57180e9823c4ab03dcce66d5b5f /tests/auto/gui
parent5cb581b3b4c3305a0dfebead1ec7049ab6f2ebc4 (diff)
parent6f3bb0aafab877c34dea3d9141a9931b5a7914a5 (diff)
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts: src/widgets/kernel/qwidget_qpa.cpp src/widgets/widgets.pro Change-Id: I697eec936c4e1a6c360edc8f0b472e23c0461ecb
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/text/qcssparser/qcssparser.pro5
-rw-r--r--tests/auto/gui/text/qcssparser/testdata.qrc18
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp4
-rw-r--r--tests/auto/gui/text/qglyphrun/qglyphrun.pro12
-rw-r--r--tests/auto/gui/text/qglyphrun/testdata.qrc5
-rw-r--r--tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp2
-rw-r--r--tests/auto/gui/text/qrawfont/qrawfont.pro5
-rw-r--r--tests/auto/gui/text/qrawfont/testdata.qrc6
-rw-r--r--tests/auto/gui/text/qzip/qzip.pro8
-rw-r--r--tests/auto/gui/text/qzip/testdata.qrc6
-rw-r--r--tests/auto/gui/text/qzip/tst_qzip.cpp4
11 files changed, 65 insertions, 10 deletions
diff --git a/tests/auto/gui/text/qcssparser/qcssparser.pro b/tests/auto/gui/text/qcssparser/qcssparser.pro
index 346a38d5f6..bb0c8c4f40 100644
--- a/tests/auto/gui/text/qcssparser/qcssparser.pro
+++ b/tests/auto/gui/text/qcssparser/qcssparser.pro
@@ -15,3 +15,8 @@ wince* {
DEPLOYMENT += addFiles timesFont
}
+android {
+ RESOURCES += \
+ testdata.qrc
+
+}
diff --git a/tests/auto/gui/text/qcssparser/testdata.qrc b/tests/auto/gui/text/qcssparser/testdata.qrc
new file mode 100644
index 0000000000..56e45cfbb0
--- /dev/null
+++ b/tests/auto/gui/text/qcssparser/testdata.qrc
@@ -0,0 +1,18 @@
+<RCC>
+ <qresource prefix="/">
+ <file>testdata/scanner/comments/input</file>
+ <file>testdata/scanner/comments/output</file>
+ <file>testdata/scanner/comments2/input</file>
+ <file>testdata/scanner/comments2/output</file>
+ <file>testdata/scanner/comments3/input</file>
+ <file>testdata/scanner/comments3/output</file>
+ <file>testdata/scanner/comments4/input</file>
+ <file>testdata/scanner/comments4/output</file>
+ <file>testdata/scanner/quotedstring/input</file>
+ <file>testdata/scanner/quotedstring/output</file>
+ <file>testdata/scanner/simple/input</file>
+ <file>testdata/scanner/simple/output</file>
+ <file>testdata/scanner/unicode/input</file>
+ <file>testdata/scanner/unicode/output</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 86e282fad2..719ca5a0a7 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -130,7 +130,9 @@ void tst_QCssParser::scanner_data()
QTest::addColumn<QString>("input");
QTest::addColumn<QString>("output");
-#if !defined(Q_OS_IRIX) && !defined(Q_OS_WINCE)
+#if defined(Q_OS_ANDROID)
+ QDir d(":/");
+#elif !defined(Q_OS_IRIX) && !defined(Q_OS_WINCE)
QDir d(SRCDIR);
#else
QDir d(QDir::current());
diff --git a/tests/auto/gui/text/qglyphrun/qglyphrun.pro b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
index db28a690a7..0993a5c49c 100644
--- a/tests/auto/gui/text/qglyphrun/qglyphrun.pro
+++ b/tests/auto/gui/text/qglyphrun/qglyphrun.pro
@@ -8,8 +8,14 @@ linux: CONFIG += insignificant_test
SOURCES += \
tst_qglyphrun.cpp
+android {
+ RESOURCES += \
+ testdata.qrc
+}
+
wince* {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
+ additionalFiles.files = test.ttf
+ additionalFiles.path = .
+ DEPLOYMENT += additionalFiles
}
+
diff --git a/tests/auto/gui/text/qglyphrun/testdata.qrc b/tests/auto/gui/text/qglyphrun/testdata.qrc
new file mode 100644
index 0000000000..c4e237ad2f
--- /dev/null
+++ b/tests/auto/gui/text/qglyphrun/testdata.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>test.ttf</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
index 3d2cde5fd3..f576627745 100644
--- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
+++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp
@@ -94,7 +94,7 @@ void tst_QGlyphRun::initTestCase()
{
m_testFont_ok = false;
- m_testFontId = QFontDatabase::addApplicationFont(SRCDIR "test.ttf");
+ m_testFontId = QFontDatabase::addApplicationFont(QFINDTESTDATA("test.ttf"));
QVERIFY(m_testFontId >= 0);
m_testFont = QFont("QtsSpecialTestFont");
diff --git a/tests/auto/gui/text/qrawfont/qrawfont.pro b/tests/auto/gui/text/qrawfont/qrawfont.pro
index 540ffb94d7..1891e7a9bf 100644
--- a/tests/auto/gui/text/qrawfont/qrawfont.pro
+++ b/tests/auto/gui/text/qrawfont/qrawfont.pro
@@ -8,3 +8,8 @@ SOURCES += \
tst_qrawfont.cpp
TESTDATA += testfont_bold_italic.ttf testfont.ttf
+
+android {
+ RESOURCES += \
+ testdata.qrc
+}
diff --git a/tests/auto/gui/text/qrawfont/testdata.qrc b/tests/auto/gui/text/qrawfont/testdata.qrc
new file mode 100644
index 0000000000..7bea0d5a39
--- /dev/null
+++ b/tests/auto/gui/text/qrawfont/testdata.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>testfont_bold_italic.ttf</file>
+ <file>testfont.ttf</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/gui/text/qzip/qzip.pro b/tests/auto/gui/text/qzip/qzip.pro
index 309f2167d1..ebcd6ec022 100644
--- a/tests/auto/gui/text/qzip/qzip.pro
+++ b/tests/auto/gui/text/qzip/qzip.pro
@@ -7,7 +7,9 @@ wince* {
addFiles.files = testdata
addFiles.path = .
DEPLOYMENT += addFiles
- DEFINES += SRCDIR=\\\".\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
+android {
+ RESOURCES += \
+ testdata.qrc
}
diff --git a/tests/auto/gui/text/qzip/testdata.qrc b/tests/auto/gui/text/qzip/testdata.qrc
new file mode 100644
index 0000000000..c7e3a6b14e
--- /dev/null
+++ b/tests/auto/gui/text/qzip/testdata.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>testdata/symlink.zip</file>
+ <file>testdata/test.zip</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/gui/text/qzip/tst_qzip.cpp b/tests/auto/gui/text/qzip/tst_qzip.cpp
index c5ce6c2676..9a5c4aaab9 100644
--- a/tests/auto/gui/text/qzip/tst_qzip.cpp
+++ b/tests/auto/gui/text/qzip/tst_qzip.cpp
@@ -68,7 +68,7 @@ void tst_QZip::cleanup()
void tst_QZip::basicUnpack()
{
- QZipReader zip(QString(SRCDIR) + "/testdata/test.zip", QIODevice::ReadOnly);
+ QZipReader zip(QFINDTESTDATA("/testdata/test.zip"), QIODevice::ReadOnly);
QList<QZipReader::FileInfo> files = zip.fileInfoList();
QCOMPARE(files.count(), 2);
@@ -104,7 +104,7 @@ void tst_QZip::basicUnpack()
void tst_QZip::symlinks()
{
- QZipReader zip(QString(SRCDIR) + "/testdata/symlink.zip", QIODevice::ReadOnly);
+ QZipReader zip(QFINDTESTDATA("/testdata/symlink.zip"), QIODevice::ReadOnly);
QList<QZipReader::FileInfo> files = zip.fileInfoList();
QCOMPARE(files.count(), 2);