summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-08-19 16:09:47 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-08-19 16:25:46 (GMT)
commitba277e9ce92dc40e648f6c83a7cd9f01dd33b886 (patch)
treece86cb348e3ee3063a3b00f8a1de65f6259d997b /tests/auto
parentd30921f13dc74a3e05a3f29c0c45147823f2a064 (diff)
downloadQt-ba277e9ce92dc40e648f6c83a7cd9f01dd33b886.zip
Qt-ba277e9ce92dc40e648f6c83a7cd9f01dd33b886.tar.gz
Qt-ba277e9ce92dc40e648f6c83a7cd9f01dd33b886.tar.bz2
Fixed autotest compilation issue on solaris
Task-number: QTBUG-12991
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp8
-rw-r--r--tests/auto/qgraphicseffectsource/tst_qgraphicseffectsource.cpp4
-rw-r--r--tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp12
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp2
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp12
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: ***