diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-09-04 09:44:03 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-09-04 10:11:12 (GMT) |
commit | 39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c (patch) | |
tree | f2e58950e5b1908a844b295643be93180aa8fc78 /src/testlib | |
parent | 19a65fca4af242269b354f82212556f88eb03eaa (diff) | |
download | Qt-39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c.zip Qt-39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c.tar.gz Qt-39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c.tar.bz2 |
Fixed once-in-a-while failing tst_QGraphicsItem::selected test.
Added event information in QTest::mouse* warning message.
Reviewed-by: Olivier
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestmouse.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 9d23c8b..665b784 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -67,6 +67,7 @@ QT_MODULE(Test) namespace QTest { enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDClick, MouseMove }; + const char *mouseActionNames[] = { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) @@ -113,8 +114,10 @@ namespace QTest QTEST_ASSERT(false); } QSpontaneKeyEvent::setSpontaneous(&me); - if (!qApp->notify(widget, &me)) - QTest::qWarn("Mouse event not accepted by receiving widget"); + if (!qApp->notify(widget, &me)) { + QString warning("Mouse event \"%1\" not accepted by receiving widget"); + QTest::qWarn(warning.arg(mouseActionNames[static_cast<int>(action)]).toAscii().data()); + } } |