diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-09-13 13:50:40 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-09-13 14:03:52 (GMT) |
commit | 5d9fb4b86ffd604e65ade61a252037dca224af53 (patch) | |
tree | b891096134180c5bf5eb512b09b69158e2a876fc | |
parent | 548155fec3a8b575215625d4fd767e63c20f6b84 (diff) | |
download | Qt-5d9fb4b86ffd604e65ade61a252037dca224af53.zip Qt-5d9fb4b86ffd604e65ade61a252037dca224af53.tar.gz Qt-5d9fb4b86ffd604e65ade61a252037dca224af53.tar.bz2 |
tests: fix compilation with suncc
Patch derived from the tasks
Task-number: QTBUG-12997
Task-number: QTBUG-12984
Task-number: QTBUG-12985
Task-number: QTBUG-12990
Task-number: QTBUG-12999
-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/qobject/tst_qobject.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp | 4 |
5 files changed, 16 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/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); |