A lice-sized code review (xdong 2009-12-24 14:08:47)

1 view
Skip to first unread message

idlec...@gmail.com

unread,
Dec 24, 2009, 1:09:02 AM12/24/09
to jame...@gmail.com, google-gadgets...@googlegroups.com
Hello james.su,

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.

James Su

unread,
Dec 24, 2009, 1:13:40 AM12/24/09
to idlec...@gmail.com, google-gadgets...@googlegroups.com
LG.

2009/12/24 <idlec...@gmail.com>
Reply all
Reply to author
Forward
0 new messages