Fix -Wlogical-op warning in qtestmouse.h

error: logical 'or' of collectively exhaustive tests is always true
[-Werror=logical-op]
Indeed these asserts do not test anything, given that MouseButtonMask is
0xffffffff

Change-Id: I33cf59d3e77d9c644fc307de36f4e0ab1bea80f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
David Faure 2012-05-05 22:37:52 +02:00 committed by Qt by Nokia
parent d3781ab09c
commit 3247f2ece9

View File

@ -100,7 +100,6 @@ namespace QTest
mouseEvent(MouseRelease, window, button, stateKey, pos);
return;
}
QTEST_ASSERT(button == Qt::NoButton || button & Qt::MouseButtonMask);
QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask);
stateKey &= static_cast<unsigned int>(Qt::KeyboardModifierMask);
@ -172,7 +171,6 @@ namespace QTest
return;
}
QTEST_ASSERT(button == Qt::NoButton || button & Qt::MouseButtonMask);
QTEST_ASSERT(stateKey == 0 || stateKey & Qt::KeyboardModifierMask);
stateKey &= static_cast<unsigned int>(Qt::KeyboardModifierMask);