From e6ddae07e1e571a7a6e0c531b961dbddcd217643 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Tue, 19 May 2015 15:03:12 +0200 Subject: Doc:added doc to undocumented functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-36985 Change-Id: Ic358682b276d67ef804f727bcf14191718613469 Reviewed-by: Topi Reiniƶ --- src/gui/kernel/qevent.cpp | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 98fb0f1f20..c231c47576 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -82,6 +82,52 @@ QEnterEvent::~QEnterEvent() { } +/*! + \fn QPoint QEnterEvent::globalPos() const + + Returns the global position of the widget \e{at the time of the event}. +*/ +/*! + \fn int QEnterEvent::globalX() const + + Returns the global position on the X-axis of the mouse cursor relative to the the widget. +*/ +/*! + \fn int QEnterEvent::globalY() const + + Returns the global position on the Y-axis of the mouse cursor relative to the the widget. +*/ +/*! + \fn QPoint QEnterEvent::localPos() const + + Returns the mouse cursor's position relative to the receiving widget. +*/ +/*! + \fn QPoint QEnterEvent::pos() const + + Returns the position of the mouse cursor in global screen coordinates. +*/ +/*! + \fn QPoint QEnterEvent::screenPos() const + + Returns the position of the mouse cursor relative to the receiving screen. +*/ +/*! + \fn QPoint QEnterEvent::windowPos() const + + Returns the position of the mouse cursor relative to the receiving window. +*/ +/*! + \fn int QEnterEvent::x() const + + Returns the x position of the mouse cursor relative to the receiving widget. +*/ +/*! + \fn int QEnterEvent::y() const + + Returns the y position of the mouse cursor relative to the receiving widget. +*/ + /*! \class QInputEvent \ingroup events @@ -4161,6 +4207,12 @@ QTouchEvent::~QTouchEvent() \sa QTouchDevice::type(), QTouchEvent::device() */ +/*! \fn QTouchEvent::TouchPoint::TouchPoint(TouchPoint &&other) + + Move-constructs a TouchPoint instance, making it point to the same + object that \a other was pointing to. +*/ + /*! \fn Qt::TouchPointStates QTouchEvent::touchPointStates() const Returns a bitwise OR of all the touch point states for this event. @@ -4687,6 +4739,10 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags) \internal */ +/*! + \fn TouchPoint &TouchPoint::operator=(TouchPoint &&other) + \internal + */ /*! \fn void QTouchEvent::TouchPoint::swap(TouchPoint &other); \internal -- cgit v1.2.3 From bfe4bca4986c033347d880e9bd3375f81093172b Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Fri, 17 Jul 2015 12:40:30 +0200 Subject: Doc: Amended the \inmodule statement for QSessionManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sources for QSessionManager live under Qt Gui so it doesn't make sense to include the class under the Qt Widgets doc module. Task-number: QTBUG-47274 Change-Id: I18b58c2a274bff323c7364cebbb0429a5a3a97d6 Reviewed-by: Topi Reiniƶ --- src/gui/kernel/qsessionmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp index b54b7b468c..f4b56fd01b 100644 --- a/src/gui/kernel/qsessionmanager.cpp +++ b/src/gui/kernel/qsessionmanager.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE \class QSessionManager \brief The QSessionManager class provides access to the session manager. - \inmodule QtWidgets + \inmodule QtGui A session manager in a desktop environment (in which Qt GUI applications live) keeps track of a session, which is a group of running applications, -- cgit v1.2.3 From 4067bbc24cf7a6d3058387225d9e67ad093991cd Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 14 Jul 2015 18:31:03 +0200 Subject: Fix shortcut handling with modifiers Since d7ca800a87a2291c94c6580f0cfe068bb2280caf the shortcut events were only sent once. The one sent by QGuiApplication did not create a QKeyEvent with the full native modifier state - basically the extended key event expected everywhere. That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on the German keyboard (resulting in ctrl+/) - would not work when the shortcut override was tested from QGuiApplication, but then the same shortcut was sent from QApplication with the full information, so it worked the second time. Shortcuts of this type in Qt Quick were broken before. Task-number: QTBUG-47062 Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7 Reviewed-by: Andy Shaw Reviewed-by: Gatis Paeglis --- src/gui/kernel/qguiapplication.cpp | 10 ++++++++-- src/gui/kernel/qwindowsysteminterface.cpp | 16 ++++++++++++++++ src/gui/kernel/qwindowsysteminterface.h | 2 ++ 3 files changed, 26 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8ebddf33a6..654567e7df 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1884,8 +1884,14 @@ void QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyE #if !defined(Q_OS_OSX) // On OS X the shortcut override is checked earlier, see: QWindowSystemInterface::handleKeyEvent() const bool checkShortcut = e->keyType == QEvent::KeyPress && window != 0; - if (checkShortcut && QWindowSystemInterface::tryHandleShortcutEvent(window, e->timestamp, e->key, e->modifiers, e->unicode, e->repeat, e->repeatCount)) - return; + if (checkShortcut) { + QKeyEvent override(QEvent::ShortcutOverride, e->key, e->modifiers, + e->nativeScanCode, e->nativeVirtualKey, e->nativeModifiers, + e->unicode, e->repeat, e->repeatCount); + override.setTimestamp(e->timestamp); + if (QWindowSystemInterface::tryHandleShortcutOverrideEvent(window, &override)) + return; + } #endif // Q_OS_OSX QKeyEvent ev(e->keyType, e->key, e->modifiers, diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index b17978cb7d..9a9eab2fe7 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -225,6 +225,22 @@ bool QWindowSystemInterface::tryHandleShortcutEvent(QWindow *w, ulong timestamp, #endif } +bool QWindowSystemInterface::tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev) +{ +#ifndef QT_NO_SHORTCUT + Q_ASSERT(ev->type() == QKeyEvent::ShortcutOverride); + + QObject *focus = w->focusObject(); + if (!focus) + focus = w; + return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(focus, ev); +#else + Q_UNUSED(w) + Q_UNUSED(ev) + return false; +#endif +} + // used by QTestLib to directly send shortcuts to objects bool QWindowSystemInterface::tryHandleShortcutEventToObject(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text, bool autorep, ushort count) diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h index c004fc6ef2..448c5d0893 100644 --- a/src/gui/kernel/qwindowsysteminterface.h +++ b/src/gui/kernel/qwindowsysteminterface.h @@ -78,6 +78,8 @@ public: Qt::KeyboardModifiers mods = Qt::NoModifier, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); + static bool tryHandleShortcutOverrideEvent(QWindow *w, QKeyEvent *ev); + static bool tryHandleShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1); static bool tryHandleShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods, -- cgit v1.2.3