Cocoa: improve mouse button tracking warnings
The warnings about "Internal mouse button tracking invalid" should check for the correct button before emitting a warning. The warning should also mention the correct button as well. For otherMouseDragged, we simply check for any button that's not the left or right button. Change-Id: I9eb6d6bd7fb5919e745b7f8eb517b4bc9efd36a6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
parent
7445d41e32
commit
5672e1affe
@ -304,7 +304,7 @@ static QTouchDevice *touchDevice = 0;
|
||||
- (void)mouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
if (!(m_buttons & Qt::LeftButton))
|
||||
qWarning("Internal Mousebutton tracking invalid(missing Qt::LeftButton");
|
||||
qWarning("QNSView mouseDragged: Internal mouse button tracking invalid (missing Qt::LeftButton)");
|
||||
[self handleMouseEvent:theEvent];
|
||||
}
|
||||
|
||||
@ -339,8 +339,8 @@ static QTouchDevice *touchDevice = 0;
|
||||
|
||||
- (void)rightMouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
if (!(m_buttons & Qt::LeftButton))
|
||||
qWarning("Internal Mousebutton tracking invalid(missing Qt::LeftButton");
|
||||
if (!(m_buttons & Qt::RightButton))
|
||||
qWarning("QNSView rightMouseDragged: Internal mouse button tracking invalid (missing Qt::RightButton)");
|
||||
[self handleMouseEvent:theEvent];
|
||||
}
|
||||
|
||||
@ -404,8 +404,8 @@ static QTouchDevice *touchDevice = 0;
|
||||
|
||||
- (void)otherMouseDragged:(NSEvent *)theEvent
|
||||
{
|
||||
if (!(m_buttons & Qt::LeftButton))
|
||||
qWarning("Internal Mousebutton tracking invalid(missing Qt::LeftButton");
|
||||
if (!(m_buttons & ~(Qt::LeftButton | Qt::RightButton)))
|
||||
qWarning("QNSView otherMouseDragged: Internal mouse button tracking invalid (missing Qt::MiddleButton or Qt::ExtraButton*)");
|
||||
[self handleMouseEvent:theEvent];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user