summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication_qpa.cpp
diff options
context:
space:
mode:
authorThorbjørn Martsum <tmartsum@gmail.com>2013-05-08 20:34:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-13 09:27:38 +0200
commit00b4bd0a4298f8ccd6ad7ba1e6ea37342f1b6a74 (patch)
treea678d38ab7d37561352362aa1117a9b5c7e99111 /src/widgets/kernel/qapplication_qpa.cpp
parentfff91190285af6520041fba90fe836bdb4870b69 (diff)
QWidgets QPA - remove wrong setting of mouse timestamp
The comment to the code said it was to avoid double click. However it actually breaks wanted double clicks. The reason for it must be that the replayed event in earlier code versions could be changed into a double click (together with the first event). However (now) we only test qt_replay_popup_mouse_event in void QWidgetWindow::handleMouseEvent(QMouseEvent *event); Regardless what kind of event we receive as input it will send QEvent::MouseButtonPress when it sends replay mouse event. I.e. it will then call QCoreApplication::sendSpontaneousEvent(r,e) => QCoreApplication::notifyInternal(receiver, event) => QCoreApplication::notify(receiver, event) => QApplicationPrivate::notify_helper(receiver, event) (+filters) => (probably) QWidgeWindow::event(receiver, event) => further handling in widget classes. That especially means that it will *not* get into the function QGuiApplicationPrivate::processMouseEvent where doubleclicks are created. Therefore no doubleclick can be made from the extra event. That makes the statement have no good effect - just side effects. Change-Id: I190baff3c060548775201695e324059560bb7106 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets/kernel/qapplication_qpa.cpp')
-rw-r--r--src/widgets/kernel/qapplication_qpa.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp
index 2761c84a8d..f6a8a3af3d 100644
--- a/src/widgets/kernel/qapplication_qpa.cpp
+++ b/src/widgets/kernel/qapplication_qpa.cpp
@@ -196,7 +196,6 @@ void QApplicationPrivate::closePopup(QWidget *popup)
// mouse release event or inside
qt_replay_popup_mouse_event = false;
} else { // mouse press event
- QGuiApplicationPrivate::mousePressTime -= 10000; // avoid double click
qt_replay_popup_mouse_event = true;
}