I'd like you to do a code review. Please review the following patch:
commit 2374ceeedfb233466a28e45830f4882fdc2f3738
Author: Tiger Dong <xd...@google.com>
Date: Thu Dec 24 14:06:14 2009 +0800
Fix Issue 341.
Qt takes care of mouse grab/release sensibly, so no need to call grabMouse/releaseMouse in our code.
After removing these calls, the bug in KDE4 plasam is also fixed. Magic!!
diff --git a/ggadget/qt/qt_view_widget.cc b/ggadget/qt/qt_view_widget.cc
index ae18afd..8e5796c 100644
--- a/ggadget/qt/qt_view_widget.cc
+++ b/ggadget/qt/qt_view_widget.cc
@@ -204,8 +204,6 @@ class QtViewWidget::Impl {
if (!view_) return;
int buttons = GetMouseButtons(event->buttons());
if (buttons != MouseEvent::BUTTON_NONE) {
- owner_->grabMouse();
-
if (!mouse_drag_moved_) {
// Ignore tiny movement of mouse.
QPoint offset = QCursor::pos() - mouse_pos_;
@@ -303,7 +301,6 @@ class QtViewWidget::Impl {
}
}
void mouseReleaseEvent(QMouseEvent *event) {
- owner_->releaseMouse();
if (!view_ || mouse_drag_moved_)
return;
This is a semiautomated message from "gitmail". Complaints or suggestions?
Mail edy...@gmail.com.