summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-12-14 09:57:11 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-12-14 10:06:55 (GMT)
commite864a530a5c48459c433518ff6ad893f33ec93d8 (patch)
treebea213b2618f8a3c264952894b9f097b20097103 /tests
parentd0cf0603fa6f55f7655e5e4b2ea5a2cbc42a39fc (diff)
downloadQt-e864a530a5c48459c433518ff6ad893f33ec93d8.zip
Qt-e864a530a5c48459c433518ff6ad893f33ec93d8.tar.gz
Qt-e864a530a5c48459c433518ff6ad893f33ec93d8.tar.bz2
Fix failing tst_QGraphicsView::QTBUG_16063_microFocusRect auto-test
This ammends commit 0af1f5508e165f3b494ab236cb1cdf1b0edcffa5. Reviewed-by: trust me
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index e1fbaee..e259177 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -4455,7 +4455,7 @@ class IMItem : public QGraphicsRectItem
{
public:
IMItem(QGraphicsItem *parent = 0):
- QGraphicsRectItem(mf.adjusted(-5, -5, 5, 5), parent)
+ QGraphicsRectItem(QRectF(0, 0, 20, 20), parent)
{
setFlag(QGraphicsItem::ItemIsFocusable, true);
setFlag(QGraphicsItem::ItemAcceptsInputMethod, true);
@@ -4486,7 +4486,7 @@ void tst_QGraphicsView::QTBUG_16063_microFocusRect()
scene.setFocusItem(item);
view.setFocus();
QRectF mfv = view.inputMethodQuery(Qt::ImMicroFocus).toRectF();
- QCOMPARE(mfv, QRectF(13.5, 13.6, 10, 10));
+ QCOMPARE(mfv, IMItem::mf.translated(-view.mapToScene(view.sceneRect().toRect()).boundingRect().topLeft()));
}
QTEST_MAIN(tst_QGraphicsView)