summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-10-08 10:38:45 (GMT)
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-10-08 10:38:45 (GMT)
commit922cf20905d829d1a4ec9205beacbee27efe35f8 (patch)
tree7a6cb45c5cf99079de6a755b993a6157820ec76a /tests
parentdf886d78631a8a7ea3aa8fdbb9da18d5a3387ed1 (diff)
parent6744bb7292c1a506e226d7ea214b7d86f6047e9d (diff)
downloadQt-922cf20905d829d1a4ec9205beacbee27efe35f8.zip
Qt-922cf20905d829d1a4ec9205beacbee27efe35f8.tar.gz
Qt-922cf20905d829d1a4ec9205beacbee27efe35f8.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsound/qsound.pro2
-rw-r--r--tests/auto/qsound/tst_qsound.cpp4
-rw-r--r--tests/auto/qsqlrecord/qsqlrecord.pro6
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp18
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/auto/qsound/qsound.pro b/tests/auto/qsound/qsound.pro
index c48d50d..383a085 100644
--- a/tests/auto/qsound/qsound.pro
+++ b/tests/auto/qsound/qsound.pro
@@ -4,7 +4,7 @@ SOURCES += tst_qsound.cpp
wince*|symbian*: {
deploy.sources += 4.wav
DEPLOYMENT = deploy
- DEFINES += SRCDIR=\\\"\\\"
+ !symbian:DEFINES += SRCDIR=\\\"\\\"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
diff --git a/tests/auto/qsound/tst_qsound.cpp b/tests/auto/qsound/tst_qsound.cpp
index dd5f2ce..fdbf6a2 100644
--- a/tests/auto/qsound/tst_qsound.cpp
+++ b/tests/auto/qsound/tst_qsound.cpp
@@ -43,6 +43,10 @@
#include <QtTest/QtTest>
#include <QtGui>
+#if defined(Q_OS_SYMBIAN)
+#define SRCDIR ""
+#endif
+
class tst_QSound : public QObject
{
Q_OBJECT
diff --git a/tests/auto/qsqlrecord/qsqlrecord.pro b/tests/auto/qsqlrecord/qsqlrecord.pro
index 7a72075..f36f076 100644
--- a/tests/auto/qsqlrecord/qsqlrecord.pro
+++ b/tests/auto/qsqlrecord/qsqlrecord.pro
@@ -9,11 +9,11 @@ symbian {
DEPLOYMENT += sqlite
}
}
-}
-TARGET.EPOCSTACKSIZE=50000
-TARGET.EPOCHEAPSIZE=50000 5000000
+ TARGET.EPOCSTACKSIZE=50000
+ TARGET.EPOCHEAPSIZE=50000 5000000
}
+
QT += sql
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index 5ccae94..fe87dfb 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -1085,10 +1085,6 @@ QT_END_NAMESPACE
void tst_QTextLayout::testTabDPIScale()
{
- #ifdef Q_OS_WINCE
- QSKIP("This test fails for large DPIs.", SkipAll);
- #endif
-
class MyPaintDevice : public QPaintDevice {
QPaintEngine *paintEngine () const { return 0; }
int metric (QPaintDevice::PaintDeviceMetric metric) const {
@@ -1118,14 +1114,14 @@ void tst_QTextLayout::testTabDPIScale()
QTextOption option = layout.textOption();
QList<QTextOption::Tab> tabs;
QTextOption::Tab tab;
- tab.position = 100;
+ tab.position = 200;
tabs.append(tab);
- tab.position = 200;
+ tab.position = 400;
tab.type = QTextOption::RightTab;
tabs.append(tab);
- tab.position = 300;
+ tab.position = 600;
tab.type = QTextOption::CenterTab;
tabs.append(tab);
option.setTabs(tabs);
@@ -1133,7 +1129,7 @@ void tst_QTextLayout::testTabDPIScale()
layout.beginLayout();
QTextLine line = layout.createLine();
- line.setLineWidth(500.);
+ line.setLineWidth(1500.);
layout.endLayout();
QCOMPARE(line.cursorToX(0), 0.);
QCOMPARE(line.cursorToX(1), (double) TESTFONT_SIZE); // check that the font does not resize
@@ -1142,9 +1138,9 @@ void tst_QTextLayout::testTabDPIScale()
int fixedScale = (int)( scale * qreal(64)); // into a QFixed
scale = ((qreal)fixedScale)/(qreal)64; // and out of a QFixed
- QCOMPARE(line.cursorToX(6), 100 * scale);
- QCOMPARE(line.cursorToX(12), 200 * scale - TESTFONT_SIZE * 5);
- QCOMPARE(line.cursorToX(18), 300 * scale - TESTFONT_SIZE * 3 / 2.0);
+ QCOMPARE(line.cursorToX(6), tabs.at(0).position * scale);
+ QCOMPARE(line.cursorToX(12), tabs.at(1).position * scale - TESTFONT_SIZE * 5);
+ QCOMPARE(line.cursorToX(18), tabs.at(2).position * scale - TESTFONT_SIZE * 3 / 2.0);
}
void tst_QTextLayout::tabHeight()