diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-05-15 15:01:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-18 13:53:15 +0200 |
commit | 6c5645578aa390bbd67bf93740ba541cb2b22525 (patch) | |
tree | 14534e5ace2072272a06bdd1973df28f724b0e5c /src/widgets/kernel | |
parent | bf3e80023a70b86c2bff793cb8dd86055236ddeb (diff) |
Remove friends of QEvent.
Introduce function to set the spontaneous flag to
QCoreApplicationPrivate to solve a few cases.
Change-Id: I7c1f1f3644defe00deea9cecb244ca258afd5b94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 9c2c2bab16..703b748a56 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3505,7 +3505,7 @@ bool QApplicationPrivate::notify_helper(QObject *receiver, QEvent * e) // deliver the event bool consumed = receiver->event(e); - e->spont = false; + QCoreApplicationPrivate::setEventSpontaneous(e, false); return consumed; } diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index fc328e7af0..06a4d8c960 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -443,7 +443,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) // Use postEvent() to ensure the local QEventLoop terminates when called from QMenu::exec() const QPoint localPos = win->mapFromGlobal(event->globalPos()); QMouseEvent *e = new QMouseEvent(QEvent::MouseButtonPress, localPos, localPos, event->globalPos(), event->button(), event->buttons(), event->modifiers()); - e->spont = 1; + QCoreApplicationPrivate::setEventSpontaneous(e, true); QGuiApplicationPrivate::setMouseEventSource(e, QGuiApplicationPrivate::mouseEventSource(event)); e->setTimestamp(event->timestamp()); QCoreApplication::postEvent(win, e); |