diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-08-18 13:57:17 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-08-19 12:36:17 (GMT) |
commit | b26af959573407b3bb4cb657f08b76023554607f (patch) | |
tree | 23c5b8d0cd279c409ffe7ca405c3064b3475a57b /src | |
parent | f50439ac2bd701f88eb7843fccbbf885c3528a54 (diff) | |
download | Qt-b26af959573407b3bb4cb657f08b76023554607f.zip Qt-b26af959573407b3bb4cb657f08b76023554607f.tar.gz Qt-b26af959573407b3bb4cb657f08b76023554607f.tar.bz2 |
Don't use pointers to temporary vars that go out of scope.
Moved the dummy variable to the same scope as the 'motion' variable.
This fixes Coverity defect CID 1528.
Reviewed-by: Olivier Goffart
Reviewed-by: Gabriel de Dietrich
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index d942519..0d07a02 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -4572,6 +4572,7 @@ bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet int deviceType = QTabletEvent::NoDevice; int pointerType = QTabletEvent::UnknownPointer; XEvent mouseMotionEvent; + XEvent dummy; const XDeviceMotionEvent *motion = 0; XDeviceButtonEvent *button = 0; const XProximityNotifyEvent *proximity = 0; @@ -4589,7 +4590,6 @@ bool QETWidget::translateXinputEvent(const XEvent *ev, QTabletDeviceData *tablet // Do event compression. Skip over tablet+mouse move events if there are newer ones. qt_tablet_motion_data tabletMotionData; tabletMotionData.tabletMotionType = tablet->xinput_motion; - XEvent dummy; while (true) { // Find first mouse event since we expect them in pairs inside Qt tabletMotionData.error =false; |