diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-09-14 00:19:56 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-09-14 00:19:56 (GMT) |
commit | 0b521e1ece29dabea90463b13f655b7ab7ea3be2 (patch) | |
tree | 08f3748c1f930d99e173966fde80988cb32e0073 /tests | |
parent | 83dcd6fbb145ce92705905c979fd8965c70f4b3a (diff) | |
parent | 0b3183427395be7dae29ba91254b00b0845b72af (diff) | |
download | Qt-0b521e1ece29dabea90463b13f655b7ab7ea3be2.zip Qt-0b521e1ece29dabea90463b13f655b7ab7ea3be2.tar.gz Qt-0b521e1ece29dabea90463b13f655b7ab7ea3be2.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/moc/tst_moc.cpp | 8 | ||||
-rw-r--r-- | tests/auto/q3table/tst_q3table.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qcompleter/tst_qcompleter.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp | 20 | ||||
-rw-r--r-- | tests/auto/qobject/tst_qobject.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp | 4 |
6 files changed, 36 insertions, 16 deletions
diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index f9c3ccb..bb23f49 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -1077,10 +1077,10 @@ void tst_Moc::qprivateslots() class PrivatePropertyTest : public QObject { Q_OBJECT - Q_PROPERTY(int foo READ foo WRITE setFoo); - Q_PRIVATE_PROPERTY(d, int bar READ bar WRITE setBar); - Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, int plop READ plop WRITE setPlop); - Q_PRIVATE_PROPERTY(PrivatePropertyTest::d_func(), int baz READ baz WRITE setBaz); + Q_PROPERTY(int foo READ foo WRITE setFoo) + Q_PRIVATE_PROPERTY(d, int bar READ bar WRITE setBar) + Q_PRIVATE_PROPERTY(PrivatePropertyTest::d, int plop READ plop WRITE setPlop) + Q_PRIVATE_PROPERTY(PrivatePropertyTest::d_func(), int baz READ baz WRITE setBaz) class MyDPointer { public: MyDPointer() : mBar(0), mPlop(0) {} diff --git a/tests/auto/q3table/tst_q3table.cpp b/tests/auto/q3table/tst_q3table.cpp index 90bf806..93de251 100644 --- a/tests/auto/q3table/tst_q3table.cpp +++ b/tests/auto/q3table/tst_q3table.cpp @@ -502,7 +502,7 @@ void tst_Q3Table::pageUpDownNavigation() void tst_Q3Table::simpleKeyboardNavigation() { QApplication::setActiveWindow(testWidget); - QTRY_COMPARE(QApplication::activeWindow(), testWidget); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(testWidget)); QWidget *w; // Test for task #24726 @@ -1208,7 +1208,7 @@ void tst_Q3Table::editCheck() table.show(); QApplication::setActiveWindow(&table); QTest::qWaitForWindowShown(&table); - QTRY_COMPARE(QApplication::activeWindow(), &table); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&table)); table.setCurrentCell(0, 0); #ifdef WAITS QTest::qWait(50); @@ -1345,7 +1345,7 @@ void tst_Q3Table::valueChanged() testWidget->show(); QApplication::setActiveWindow(testWidget); QTest::qWaitForWindowShown(testWidget); - QTRY_COMPARE(QApplication::activeWindow(), testWidget); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(testWidget)); #ifdef WAITS QTest::qWait(50); #endif @@ -1395,7 +1395,7 @@ void tst_Q3Table::dateTimeEdit() testWidget->show(); QApplication::setActiveWindow(testWidget); QTest::qWaitForWindowShown(testWidget); - QTRY_COMPARE(QApplication::activeWindow(), testWidget); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(testWidget)); #ifdef WAITS QTest::qWait(50); #endif diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index a62720b..1590528 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -1324,7 +1324,7 @@ void tst_QCompleter::task253125_lineEditCompletion() #endif QTest::qWait(10); QApplication::setActiveWindow(&edit); - QTRY_COMPARE(QApplication::activeWindow(), &edit); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&edit)); QTest::keyClick(&edit, 'i'); QCOMPARE(edit.completer()->currentCompletion(), QString("iota")); @@ -1362,7 +1362,7 @@ void tst_QCompleter::task247560_keyboardNavigation() QTest::qWait(10); QApplication::setActiveWindow(&edit); - QTRY_COMPARE(QApplication::activeWindow(), &edit); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&edit)); QTest::keyClick(&edit, 'r'); QTest::keyClick(edit.completer()->popup(), Qt::Key_Down); diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index c145623..b8e729e 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -287,6 +287,7 @@ private slots: void taskQTBUG_5904_crashWithDeviceCoordinateCache(); void taskQT657_paintIntoCacheWithTransparentParts(); void taskQTBUG_7863_paintIntoCacheWithTransparentParts(); + void taskQT_3674_doNotCrash(); }; void tst_QGraphicsScene::initTestCase() @@ -4565,6 +4566,25 @@ void tst_QGraphicsScene::taskQTBUG_7863_paintIntoCacheWithTransparentParts() } } +void tst_QGraphicsScene::taskQT_3674_doNotCrash() +{ + QGraphicsScene scene; + + QGraphicsView view(&scene); + view.resize(200, 200); + + QPixmap pixmap(view.size()); + QPainter painter(&pixmap); + view.render(&painter); + painter.end(); + + scene.addItem(new QGraphicsWidget); + scene.setBackgroundBrush(Qt::green); + + QApplication::processEvents(); + QApplication::processEvents(); +} + void tst_QGraphicsScene::zeroScale() { //should not crash diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp index 08b7c19..5f6262e 100644 --- a/tests/auto/qobject/tst_qobject.cpp +++ b/tests/auto/qobject/tst_qobject.cpp @@ -3243,16 +3243,16 @@ void tst_QObject::overloads() QCOMPARE(obj2.s_num, 101); emit obj1.sig(&obj2, &obj3); //this signal is connected QCOMPARE(obj1.s_num, 11); - QCOMPARE(obj1.o1_obj, &obj2); + QCOMPARE(obj1.o1_obj, (QObject *)&obj2); QCOMPARE(obj1.o2_obj, &obj3); QCOMPARE(obj1.o3_obj, (QObject *)0); //default arg of the signal - QCOMPARE(obj1.o4_obj, qApp); //default arg of the slot + QCOMPARE(obj1.o4_obj, (QObject *)qApp); //default arg of the slot QCOMPARE(obj2.s_num, 111); - QCOMPARE(obj2.o1_obj, &obj2); + QCOMPARE(obj2.o1_obj, (QObject *)&obj2); QCOMPARE(obj2.o2_obj, &obj3); QCOMPARE(obj2.o3_obj, (QObject *)0); //default arg of the signal - QCOMPARE(obj2.o4_obj, qApp); //default arg of the slot + QCOMPARE(obj2.o4_obj, (QObject *)qApp); //default arg of the slot } class ManySignals : public QObject diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index e154528..e16be8b 100644 --- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -381,7 +381,7 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation() QCOMPARE(a1_s_o2->currentLoopTime(), 250); QCOMPARE(notTimeDriven->currentLoopTime(), 0); QCOMPARE(loopsForever->currentLoopTime(), 0); - QCOMPARE(group.currentAnimation(), notTimeDriven); + QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation *>(notTimeDriven)); // Current time = 505 group.setCurrentTime(505); @@ -391,7 +391,7 @@ void tst_QSequentialAnimationGroup::setCurrentTimeWithUncontrolledAnimation() QCOMPARE(a1_s_o2->currentLoopTime(), 250); QCOMPARE(notTimeDriven->currentLoopTime(), 5); QCOMPARE(loopsForever->currentLoopTime(), 0); - QCOMPARE(group.currentAnimation(), notTimeDriven); + QCOMPARE(group.currentAnimation(), static_cast<QAbstractAnimation *>(notTimeDriven)); QCOMPARE(sequence->state(), QAnimationGroup::Stopped); QCOMPARE(a1_s_o1->state(), QAnimationGroup::Stopped); QCOMPARE(a1_s_o2->state(), QAnimationGroup::Stopped); |