summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp')
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
index 3c98f8936c..7a5aabe714 100644
--- a/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -1515,7 +1515,7 @@ void tst_QGraphicsWidget::setTabOrderAndReparent()
for (i = 1; i < 4; ++i) {
QGraphicsWidget *wid = new QGraphicsWidget;
wid->setFocusPolicy(Qt::StrongFocus);
- wid->setData(0, QString::fromAscii("w%1").arg(i));
+ wid->setData(0, QString::fromLatin1("w%1").arg(i));
scene.addItem(wid);
if (i == 1)
w1 = wid;
@@ -1555,7 +1555,7 @@ void tst_QGraphicsWidget::setTabOrderAndReparent()
for (i = 1; i < 5; ++i) {
QGraphicsWidget *wid = new QGraphicsWidget;
wid->setFocusPolicy(Qt::StrongFocus);
- wid->setData(0, QString::fromAscii("w%1").arg(i));
+ wid->setData(0, QString::fromLatin1("w%1").arg(i));
scene.addItem(wid);
if (i == 1)
w1 = wid;
@@ -3191,7 +3191,7 @@ void tst_QGraphicsWidget::initialShow2()
view.show();
QTest::qWaitForWindowShown(&view);
-#ifndef Q_OS_MAC
+#if defined(Q_OS_WIN) || defined(UBUNTU_LUCID)
QEXPECT_FAIL("", "QTBUG-20778", Abort);
#endif
QTRY_COMPARE(widget->repaints, expectedRepaintCount);
@@ -3211,11 +3211,11 @@ void tst_QGraphicsWidget::itemChangeEvents()
break;
}
case QEvent::ParentAboutToChange: {
- valueDuringEvents.insert(QEvent::ParentAboutToChange, qVariantFromValue(parentItem()));
+ valueDuringEvents.insert(QEvent::ParentAboutToChange, QVariant::fromValue(parentItem()));
break;
}
case QEvent::ParentChange: {
- valueDuringEvents.insert(QEvent::ParentChange, qVariantFromValue(parentItem()));
+ valueDuringEvents.insert(QEvent::ParentChange, QVariant::fromValue(parentItem()));
break;
}
case QEvent::CursorChange: {
@@ -3252,10 +3252,10 @@ void tst_QGraphicsWidget::itemChangeEvents()
TestGraphicsWidget *item = new TestGraphicsWidget;
item->setParentItem(parent);
// ParentAboutToChange should be triggered before the parent has changed
- QTRY_COMPARE(qVariantValue<QGraphicsItem *>(item->valueDuringEvents.value(QEvent::ParentAboutToChange)),
+ QTRY_COMPARE(qvariant_cast<QGraphicsItem *>(item->valueDuringEvents.value(QEvent::ParentAboutToChange)),
static_cast<QGraphicsItem *>(0));
// ParentChange should be triggered after the parent has changed
- QTRY_COMPARE(qVariantValue<QGraphicsItem *>(item->valueDuringEvents.value(QEvent::ParentChange)),
+ QTRY_COMPARE(qvariant_cast<QGraphicsItem *>(item->valueDuringEvents.value(QEvent::ParentChange)),
static_cast<QGraphicsItem *>(parent));
// ShowEvent should be triggered before the item is shown