diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-08-19 16:09:47 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-08-19 16:16:04 (GMT) |
commit | 9b4c6ab8e27873c133f16ea655d7220b1ba348cf (patch) | |
tree | e780faebefb255c6779df4a11e07c4dc59b49a38 | |
parent | 5a3deba02336cb1798a11f1b24f1460a83df5c3e (diff) | |
download | Qt-9b4c6ab8e27873c133f16ea655d7220b1ba348cf.zip Qt-9b4c6ab8e27873c133f16ea655d7220b1ba348cf.tar.gz Qt-9b4c6ab8e27873c133f16ea655d7220b1ba348cf.tar.bz2 |
Fixed autotest compilation issue on solaris
Task-number: QTBUG-12991
5 files changed, 19 insertions, 19 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp index 5dc0c9d..fa6a5ec 100644 --- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp +++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp @@ -183,20 +183,20 @@ void tst_QGraphicsEffect::source() QGraphicsItem *item = new QGraphicsRectItem(0, 0, 10, 10); item->setGraphicsEffect(effect); QVERIFY(effect->source()); - QCOMPARE(effect->source()->graphicsItem(), item); + QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item); QVERIFY(effect->m_sourceChangedFlags & QGraphicsEffect::SourceAttached); effect->reset(); // Make sure disabling/enabling the effect doesn't change the source. effect->setEnabled(false); QVERIFY(effect->source()); - QCOMPARE(effect->source()->graphicsItem(), item); + QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item); QVERIFY(!effect->m_sourceChangedFlags); effect->reset(); effect->setEnabled(true); QVERIFY(effect->source()); - QCOMPARE(effect->source()->graphicsItem(), item); + QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item); QVERIFY(!effect->m_sourceChangedFlags); effect->reset(); @@ -210,7 +210,7 @@ void tst_QGraphicsEffect::source() item->setGraphicsEffect(effect); QPointer<QGraphicsEffectSource> source = effect->source(); QVERIFY(source); - QCOMPARE(source->graphicsItem(), item); + QCOMPARE(source->graphicsItem(), (const QGraphicsItem*)item); delete item; QVERIFY(!effect); QVERIFY(!source); diff --git a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp index 49a76fa..af23b46 100644 --- a/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp +++ b/tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp @@ -209,7 +209,7 @@ void tst_QGraphicsEffectSource::init() void tst_QGraphicsEffectSource::graphicsItem() { QVERIFY(effect->source()); - QCOMPARE(effect->source()->graphicsItem(), item); + QCOMPARE(effect->source()->graphicsItem(), (const QGraphicsItem*)item); } void tst_QGraphicsEffectSource::styleOption() @@ -237,7 +237,7 @@ void tst_QGraphicsEffectSource::isPixmap() CustomEffect *anotherEffect = new CustomEffect; pixmapItem->setGraphicsEffect(anotherEffect); QVERIFY(anotherEffect->source()); - QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<QGraphicsItem *>(pixmapItem)); + QCOMPARE(anotherEffect->source()->graphicsItem(), static_cast<const QGraphicsItem *>(pixmapItem)); QVERIFY(anotherEffect->source()->isPixmap()); delete pixmapItem; } diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 6cea834..411c790 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -788,7 +788,7 @@ void tst_QGraphicsProxyWidget::focusNextPrevChild() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); if (hasScene) { scene.addItem(proxy); proxy->show(); @@ -837,7 +837,7 @@ void tst_QGraphicsProxyWidget::focusOutEvent() view.setFocus(); QTest::qWaitForWindowShown(&view); QTRY_VERIFY(view.isVisible()); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); QWidget *widget = new QWidget; widget->setFocusPolicy(Qt::WheelFocus); @@ -1093,7 +1093,7 @@ void tst_QGraphicsProxyWidget::keyPressEvent() view.viewport()->setFocus(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget; proxy->setFlag(QGraphicsItem::ItemIsFocusable, true); // ### remove me!!! @@ -1134,7 +1134,7 @@ void tst_QGraphicsProxyWidget::keyReleaseEvent() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget; @@ -1178,7 +1178,7 @@ void tst_QGraphicsProxyWidget::mouseDoubleClickEvent() QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); SubQGraphicsProxyWidget *proxy = new SubQGraphicsProxyWidget; proxy->setFlag(QGraphicsItem::ItemIsFocusable, true); // ### remove me!!! @@ -3472,7 +3472,7 @@ void tst_QGraphicsProxyWidget::clickFocus() qt_x11_wait_for_window_manager(&view); #endif QApplication::setActiveWindow(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); QVERIFY(!proxy->hasFocus()); QVERIFY(!proxy->widget()->hasFocus()); diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index 67a41ca..903977c 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -1491,7 +1491,7 @@ void tst_QGraphicsScene::clear() scene.setItemIndexMethod(QGraphicsScene::NoIndex); scene.addItem(firstItem); scene.addItem(secondItem); - QCOMPARE(scene.items().at(0), firstItem); + QCOMPARE(scene.items().at(0), (QGraphicsItem*)firstItem); QCOMPARE(scene.items().at(1), secondItem); ClearTestItem *thirdItem = new ClearTestItem(firstItem); diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index bda22eb..e5628d1 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -890,7 +890,7 @@ void tst_QGraphicsWidget::initStyleOption() qt_x11_wait_for_window_manager(&view); #endif QApplication::setActiveWindow(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); view.setAlignment(Qt::AlignTop | Qt::AlignLeft); SubQGraphicsWidget *widget = new SubQGraphicsWidget; @@ -1222,7 +1222,7 @@ void tst_QGraphicsWidget::setTabOrder() qt_x11_wait_for_window_manager(&view); #endif QApplication::setActiveWindow(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); QGraphicsWidget *lastItem = 0; QTest::ignoreMessage(QtWarningMsg, "QGraphicsWidget::setTabOrder(0, 0) is undefined"); @@ -1285,7 +1285,7 @@ void tst_QGraphicsWidget::setTabOrderAndReparent() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); int i; QGraphicsWidget *w1, *w2, *w3, *w4; @@ -1425,7 +1425,7 @@ void tst_QGraphicsWidget::verifyFocusChain() view.show(); QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); { // parent/child focus @@ -1552,7 +1552,7 @@ void tst_QGraphicsWidget::updateFocusChainWhenChildDie() qt_x11_wait_for_window_manager(&view); #endif QApplication::setActiveWindow(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); // delete item in focus chain with no focus and verify chain SubQGraphicsWidget *parent = new SubQGraphicsWidget(0, Qt::Window); @@ -2503,7 +2503,7 @@ void tst_QGraphicsWidget::task250119_shortcutContext() view.setScene(&scene); view.show(); QApplication::setActiveWindow(&view); - QTRY_COMPARE(QApplication::activeWindow(), &view); + QTRY_COMPARE(QApplication::activeWindow(), (QWidget*)&view); // *** Event: *** |