summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-21 16:29:53 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-21 16:29:53 (GMT)
commitb4334982c1cb6058f02a6633cdf3cacc334d8e51 (patch)
tree26a803837b7631de83a77f3490de66b9ed02db26 /tests
parent02c83c2adf0513041d9a3866d4e589ad79d61bda (diff)
parentf5bab2bc74ed03fd1db99cba3830b6b21795a627 (diff)
downloadQt-b4334982c1cb6058f02a6633cdf3cacc334d8e51.zip
Qt-b4334982c1cb6058f02a6633cdf3cacc334d8e51.tar.gz
Qt-b4334982c1cb6058f02a6633cdf3cacc334d8e51.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 5699175f55acbdfa4ac95ab6c727ebd4a201f3a2 Fixed device context leak in QGLWidget on Windows. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( a13977ce2aba31808a046cddc082a84dc316d78b ) Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 508b02a252b524d34f3ed970eef3bdb6350a2b77 Re-enable data structure packing in Harfbuzz for RVCT Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 85a48bdb52a81a9d18477a347fba5f6c930af416 ) Fixed memory lean in QImageVideoBuffer and QMemoryVideoBuffer. QLocalSocket/Win: handle ERROR_MORE_DATA after read operation Fix possible crash in QTextLayout for glyphless items Attempt to stabilize tst_qtimeline::value Attempt to stabilize tst_lconvert Replace custom WAIT_FOR_CONDITION with semi-standard QTRY_COMPARE Attempt to stabilize tst_qwidget::taskQTBUG_4055_sendSyntheticEnterLeave Attempt to stabilize tst_qwidget::syntheticEnterLeave Attempt to stabilize tst_qwidgetaction::visibilityUpdate Attempt to stabilize tst_lupdate::good Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( aa3f786bdba4dc153620ae7f98e4b0e41770d1d1 ) Audio (osx); In pull mode emit readyRead() for each period received. AudioInput example; disconnect from the built-in device when changing mode.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lconvert/tst_lconvert.cpp2
-rw-r--r--tests/auto/linguist/lupdate/tst_lupdate.cpp2
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp19
-rw-r--r--tests/auto/qtimeline/tst_qtimeline.cpp12
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp27
-rw-r--r--tests/auto/qwidgetaction/tst_qwidgetaction.cpp6
6 files changed, 32 insertions, 36 deletions
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp
index 054da4a..998f588 100644
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
@@ -153,7 +153,7 @@ void tst_lconvert::verifyReadFail(const QString &fn)
{
QProcess cvt;
cvt.start(binDir + "/lconvert", QStringList() << (dataDir + fn));
- QVERIFY(cvt.waitForFinished(1000));
+ QVERIFY(cvt.waitForFinished(10000));
QVERIFY(cvt.exitStatus() == QProcess::NormalExit);
QVERIFY2(cvt.exitCode() == 2, "Accepted invalid input");
}
diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp
index c179462..5ba6c52 100644
--- a/tests/auto/linguist/lupdate/tst_lupdate.cpp
+++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp
@@ -288,7 +288,7 @@ void tst_lupdate::good()
proc.setWorkingDirectory(workDir);
proc.setProcessChannelMode(QProcess::MergedChannels);
proc.start(m_cmdLupdate + ' ' + lupdatecmd, QIODevice::ReadWrite | QIODevice::Text);
- QVERIFY2(proc.waitForFinished(5000), qPrintable(lupdatecmd));
+ QVERIFY2(proc.waitForFinished(30000), qPrintable(lupdatecmd));
QByteArray output = proc.readAll();
QVERIFY2(proc.exitStatus() == QProcess::NormalExit,
"\"lupdate " + lupdatecmd.toLatin1() + "\" crashed\n" + output);
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index a631f3d..f798faf 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -112,6 +112,7 @@ private slots:
void columnWrapWithTabs();
void boundingRectForUnsetLineWidth();
void boundingRectForSetLineWidth();
+ void glyphLessItems();
// QTextLine stuff
void setNumColumnsWrapAtWordBoundaryOrAnywhere();
@@ -1339,6 +1340,24 @@ void tst_QTextLayout::lineWidthFromBOM()
// Don't spin into an infinite loop
}
+void tst_QTextLayout::glyphLessItems()
+{
+ {
+ QTextLayout layout;
+ layout.setText("\t\t");
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+
+ {
+ QTextLayout layout;
+ layout.setText(QString::fromLatin1("AA") + QChar(QChar::LineSeparator));
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+}
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"
diff --git a/tests/auto/qtimeline/tst_qtimeline.cpp b/tests/auto/qtimeline/tst_qtimeline.cpp
index b15d2a4..47d0550 100644
--- a/tests/auto/qtimeline/tst_qtimeline.cpp
+++ b/tests/auto/qtimeline/tst_qtimeline.cpp
@@ -247,11 +247,7 @@ void tst_QTimeLine::frameRate()
void tst_QTimeLine::value()
{
-#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - use longer times
QTimeLine timeLine(2000);
-#else
- QTimeLine timeLine(200);
-#endif
QVERIFY(timeLine.currentValue() == 0.0);
// Default speed
@@ -270,19 +266,11 @@ void tst_QTimeLine::value()
timeLine.setCurrentTime(100);
timeLine.start();
// Let it update on its own
-#ifdef Q_OS_WINCE
QTest::qWait(500);
-#else
- QTest::qWait(50);
-#endif
QCOMPARE(timeLine.state(), QTimeLine::Running);
qreal value = timeLine.currentValue();
timeLine.setDirection(QTimeLine::Backward);
-#ifdef Q_OS_WINCE
QTest::qWait(1000);
-#else
- QTest::qWait(100);
-#endif
QVERIFY(timeLine.currentValue() < value);
timeLine.stop();
}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 045216a..2d559c8 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -151,16 +151,6 @@ bool macHasAccessToWindowsServer()
#undef Bool
#endif
-// Will try to wait for the condition while allowing event processing
-// for a maximum of 2 seconds.
-#define WAIT_FOR_CONDITION(expr, expected) \
- do { \
- const int step = 100; \
- for (int i = 0; i < 2000 && expr != expected; i+=step) { \
- QTest::qWait(step); \
- } \
- } while(0)
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -1665,13 +1655,11 @@ void tst_QWidget::focusChainOnHide()
child->setFocus();
qApp->processEvents();
- WAIT_FOR_CONDITION(child->hasFocus(), true);
- QCOMPARE(child->hasFocus(), true);
+ QTRY_COMPARE(child->hasFocus(), true);
child->hide();
qApp->processEvents();
- WAIT_FOR_CONDITION(parent->hasFocus(), true);
- QCOMPARE(parent->hasFocus(), true);
+ QTRY_COMPARE(parent->hasFocus(), true);
QCOMPARE(parent, qApp->focusWidget());
delete parent;
@@ -9241,7 +9229,8 @@ void tst_QWidget::syntheticEnterLeave()
QCOMPARE(grandChild->numLeaveEvents, 0);
QCOMPARE(child1->numLeaveEvents, 0);
- QCOMPARE(window.numEnterEvents, 1);
+ // This event arrives asynchronously
+ QTRY_COMPARE(window.numEnterEvents, 1);
QCOMPARE(child2->numEnterEvents, 1);
QCOMPARE(grandChild->numEnterEvents, 1);
QCOMPARE(child1->numEnterEvents, 0);
@@ -9332,7 +9321,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
child.show();
// Make sure the child gets enter event and no mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 0);
child.hide();
@@ -9343,7 +9332,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
// Make sure the child gets enter event and mouse move event.
// Note that we verify event->button() and event->buttons()
// in SELChild::mouseMoveEvent().
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 1);
// Sending synthetic enter/leave trough the parent's mousePressEvent handler.
@@ -9354,7 +9343,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
QTest::mouseClick(&parent, Qt::LeftButton);
// Make sure the child gets enter event and one mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 1);
child.hide();
@@ -9363,7 +9352,7 @@ void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
QTest::mouseClick(&parent, Qt::LeftButton);
// Make sure the child gets enter event and no mouse move event.
- QCOMPARE(child.numEnterEvents, 1);
+ QTRY_COMPARE(child.numEnterEvents, 1);
QCOMPARE(child.numMouseMoveEvents, 0);
}
#endif
diff --git a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
index 53dc4b5..efe4838 100644
--- a/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
+++ b/tests/auto/qwidgetaction/tst_qwidgetaction.cpp
@@ -187,12 +187,12 @@ void tst_QWidgetAction::visibilityUpdate()
action->setDefaultWidget(combo);
tb.addAction(action);
- qApp->processEvents(); //the call to show is delayed by the toolbar layout
- QVERIFY(combo->isVisible());
+ //the call to show is delayed by the toolbar layout
+ QTRY_VERIFY(combo->isVisible());
QVERIFY(action->isVisible());
action->setVisible(false);
- qApp->processEvents(); //the call to hide is delayed by the toolbar layout
+ //the call to hide is delayed by the toolbar layout
QTRY_VERIFY(!combo->isVisible());
delete action;