diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-19 10:07:06 +1000 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-19 10:07:06 +1000 |
commit | 429946733541fdcdea13d5e470f61ac530b53980 (patch) | |
tree | 75aa2742fa90d497e092cf5a9a7210b39edc4986 /tests/auto/qmouseevent/tst_qmouseevent.cpp | |
parent | f5ec7f0f6bbedc537b1ad71bab7a806a6e0d85c3 (diff) | |
parent | 9a6a58a95af31816627550c573c1b2ac39fc404e (diff) |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
tests: fixed compilation of tst_qtextstream
QUiLoader, QAbstractFormBuilder: Introduce errorString().
Enable configuration for Xcb
Fall back to using paths for large fonts in drawStaticText()
Add ability to work around non-standard GLES implementations
Fix broken drawing with large fonts using QStaticText and FreeType
Remove Q_ASSERT's from qdbustype autotest
Remove autotest code for Qt3Support library.
Diffstat (limited to 'tests/auto/qmouseevent/tst_qmouseevent.cpp')
-rw-r--r-- | tests/auto/qmouseevent/tst_qmouseevent.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/tests/auto/qmouseevent/tst_qmouseevent.cpp b/tests/auto/qmouseevent/tst_qmouseevent.cpp index 9d61e7d396..d86c5cc8b2 100644 --- a/tests/auto/qmouseevent/tst_qmouseevent.cpp +++ b/tests/auto/qmouseevent/tst_qmouseevent.cpp @@ -62,17 +62,9 @@ public: } bool mousePressEventRecieved; bool mouseReleaseEventRecieved; -#ifdef QT3_SUPPORT - int mousePressStateBefore; - int mousePressStateAfter; -#endif int mousePressButton; int mousePressButtons; int mousePressModifiers; -#ifdef QT3_SUPPORT - int mouseReleaseStateBefore; - int mouseReleaseStateAfter; -#endif int mouseReleaseButton; int mouseReleaseButtons; int mouseReleaseModifiers; @@ -80,10 +72,6 @@ protected: void mousePressEvent(QMouseEvent *e) { QWidget::mousePressEvent(e); -#ifdef QT3_SUPPORT - mousePressStateBefore = e->state(); - mousePressStateAfter = e->stateAfter(); -#endif mousePressButton = e->button(); mousePressButtons = e->buttons(); mousePressModifiers = e->modifiers(); @@ -93,10 +81,6 @@ protected: void mouseReleaseEvent(QMouseEvent *e) { QWidget::mouseReleaseEvent(e); -#ifdef QT3_SUPPORT - mouseReleaseStateBefore = e->state(); - mouseReleaseStateAfter = e->stateAfter(); -#endif mouseReleaseButton = e->button(); mouseReleaseButtons = e->buttons(); mouseReleaseModifiers = e->modifiers(); @@ -125,8 +109,6 @@ private slots: void checkMouseReleaseEvent_data(); void checkMouseReleaseEvent(); - void qt3supportConstructors(); - private: MouseEventWidget* testMouseWidget; }; @@ -157,12 +139,6 @@ void tst_QMouseEvent::init() { testMouseWidget->mousePressEventRecieved = FALSE; testMouseWidget->mouseReleaseEventRecieved = FALSE; -#ifdef QT3_SUPPORT - testMouseWidget->mousePressStateBefore = 0; - testMouseWidget->mousePressStateAfter = 0; - testMouseWidget->mouseReleaseStateBefore = 0; - testMouseWidget->mouseReleaseStateAfter = 0; -#endif testMouseWidget->mousePressButton = 0; testMouseWidget->mousePressButtons = 0; testMouseWidget->mousePressModifiers = 0; @@ -210,13 +186,6 @@ void tst_QMouseEvent::checkMousePressEvent() QCOMPARE(testMouseWidget->mousePressButton, button); QCOMPARE(testMouseWidget->mousePressButtons, buttons); QCOMPARE(testMouseWidget->mousePressModifiers, modifiers); -#ifdef QT3_SUPPORT - int stateAfter = buttons|modifiers; - int stateBefore = stateAfter & ~button; - - QCOMPARE(testMouseWidget->mousePressStateBefore, stateBefore); - QCOMPARE(testMouseWidget->mousePressStateAfter, stateAfter); -#endif QTest::mouseRelease(testMouseWidget, Qt::MouseButton(buttonPressed), Qt::KeyboardModifiers(keyPressed)); } @@ -256,35 +225,6 @@ void tst_QMouseEvent::checkMouseReleaseEvent() QCOMPARE(testMouseWidget->mouseReleaseButton, button); QCOMPARE(testMouseWidget->mouseReleaseButtons, buttons); QCOMPARE(testMouseWidget->mouseReleaseModifiers, modifiers); -#ifdef QT3_SUPPORT - int stateAfter = buttons|modifiers; - int stateBefore = stateAfter|button; - - QCOMPARE(testMouseWidget->mouseReleaseStateBefore, stateBefore); - QCOMPARE(testMouseWidget->mouseReleaseStateAfter, stateAfter); -#endif -} - -void tst_QMouseEvent::qt3supportConstructors() -{ -#if !defined(QT3_SUPPORT) - QSKIP( "No Qt3Support present", SkipAll); -#else - // make sure the state() and stateAfter() functions return the - // same thing they did in Qt 3 when using these constructors - - { - QMouseEvent e(QEvent::MouseButtonPress, QPoint(0, 0), Qt::LeftButton, 0); - QCOMPARE(e.state(), Qt::ButtonState(Qt::NoButton)); - QCOMPARE(e.stateAfter(), Qt::ButtonState(Qt::LeftButton)); - } - - { - QMouseEvent e(QEvent::MouseButtonPress, QPoint(0, 0), QPoint(0, 0), Qt::LeftButton, 0); - QCOMPARE(e.state(), Qt::ButtonState(Qt::NoButton)); - QCOMPARE(e.stateAfter(), Qt::ButtonState(Qt::LeftButton)); - } -#endif } QTEST_MAIN(tst_QMouseEvent) |