From 15cc31c013afdefcb432bbeb94d10b4121c09e54 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Wed, 10 Dec 2014 20:28:29 +0300 Subject: QPlatformSystemTrayIcon: the timeout is in msecs, not secs What gets passed to this function is in milliseconds, not seconds (see QSystemTrayIconPrivate::showMessage_sys_qpa implementation), and the only currently existing implementation (in KDE frameworkintegration) expects milliseconds as well. Change-Id: I7a2c847530391aa73183704251c996664668a740 Reviewed-by: Sean Harmer Reviewed-by: Friedemann Kleint --- src/gui/kernel/qplatformsystemtrayicon.cpp | 4 ++-- src/gui/kernel/qplatformsystemtrayicon.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qplatformsystemtrayicon.cpp b/src/gui/kernel/qplatformsystemtrayicon.cpp index 7bc61e6e6e..ba1ccc379d 100644 --- a/src/gui/kernel/qplatformsystemtrayicon.cpp +++ b/src/gui/kernel/qplatformsystemtrayicon.cpp @@ -119,9 +119,9 @@ QPlatformSystemTrayIcon::~QPlatformSystemTrayIcon() /*! \fn void QPlatformSystemTrayIcon::showMessage(const QString &msg, const QString &title, - const QIcon &icon, MessageIcon iconType, int secs) + const QIcon &icon, MessageIcon iconType, int msecs) Shows a balloon message for the entry with the given \a title, message \a msg and \a icon for - the time specified in \a secs. \a iconType is used as a hint for the implementing platform. + the time specified in \a msecs. \a iconType is used as a hint for the implementing platform. \sa QSystemTrayIcon::showMessage() */ diff --git a/src/gui/kernel/qplatformsystemtrayicon.h b/src/gui/kernel/qplatformsystemtrayicon.h index 499b5fca17..1317708cd1 100644 --- a/src/gui/kernel/qplatformsystemtrayicon.h +++ b/src/gui/kernel/qplatformsystemtrayicon.h @@ -70,7 +70,7 @@ public: virtual void updateMenu(QPlatformMenu *menu) = 0; virtual QRect geometry() const = 0; virtual void showMessage(const QString &msg, const QString &title, - const QIcon &icon, MessageIcon iconType, int secs) = 0; + const QIcon &icon, MessageIcon iconType, int msecs) = 0; virtual bool isSystemTrayAvailable() const = 0; virtual bool supportsMessages() const = 0; -- cgit v1.2.3 From 033318f7a747ee2630542bed37df7e3fc10a0fb1 Mon Sep 17 00:00:00 2001 From: Jason Haslam Date: Fri, 21 Nov 2014 14:33:59 -0700 Subject: Check for valid receiver before sending gesture events. Gesture events sent to a disappearing tooltip can crash. This can most easily be seen by scrolling over a tooltip on OSX with a magic mouse middle scroll gesture. Task-number: QTBUG-42826 Change-Id: Id5510895f63297ca157e3d24a3f4e3a6034586e8 Reviewed-by: Andy Shaw Reviewed-by: Shawn Rutledge Reviewed-by: Laszlo Agocs --- src/gui/kernel/qguiapplication.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index e3f4794e6d..dc5501eaf5 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2168,6 +2168,9 @@ void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInter #ifndef QT_NO_GESTURES void QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e) { + if (e->window.isNull()) + return; + QNativeGestureEvent ev(e->type, e->pos, e->pos, e->globalPos, e->realValue, e->sequenceId, e->intValue); ev.setTimestamp(e->timestamp); QGuiApplication::sendSpontaneousEvent(e->window, &ev); -- cgit v1.2.3 From 0920e00932b2686b59247633ea01669fcc398f9c Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Mon, 22 Dec 2014 10:00:54 +0200 Subject: Check screen before changing cursor Task-number: QTBUG-43508 Change-Id: I6b525cab2a3958f4e3528ed8102d07984f152e60 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index c5d88b198b..a4b5376b6f 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2393,7 +2393,8 @@ void QWindowPrivate::setCursor(const QCursor *newCursor) hasCursor = false; } // Only attempt to set cursor and emit signal if there is an actual platform cursor - if (q->screen()->handle()->cursor()) { + QScreen* screen = q->screen(); + if (screen && screen->handle()->cursor()) { applyCursor(); QEvent event(QEvent::CursorChange); QGuiApplication::sendEvent(q, &event); -- cgit v1.2.3 From a8714548d18884f3dc90cb51b251bc1f612db6e2 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 17 Dec 2014 15:20:29 +0100 Subject: Doc: corrected broken links qtbase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-43115 Change-Id: Ib441326083294a6d59d75510142b1481f7b0bc35 Reviewed-by: Topi Reiniƶ Reviewed-by: Martin Smith --- src/gui/kernel/qevent.cpp | 2 -- src/gui/kernel/qopenglcontext.cpp | 12 +++++------- src/gui/kernel/qstylehints.cpp | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a8c34a8871..60e7b97f12 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -283,7 +283,6 @@ QMouseEvent::~QMouseEvent() \sa Qt::MouseEventSource \sa QGraphicsSceneMouseEvent::source() - \sa QGraphicsSceneMouseEvent::setSource() */ Qt::MouseEventSource QMouseEvent::source() const { @@ -299,7 +298,6 @@ Qt::MouseEventSource QMouseEvent::source() const \sa Qt::MouseEventFlag \sa QGraphicsSceneMouseEvent::flags() - \sa QGraphicsSceneMouseEvent::setFlags() */ Qt::MouseEventFlags QMouseEvent::flags() const { diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index c01e1c95dd..5918f30660 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -519,7 +519,7 @@ void QOpenGLContext::setScreen(QScreen *screen) value type. These classes can be found in the QtPlatformHeaders module. When create() is called with native handles set, the handles' ownership are - not taken, meaning that destroy() will not destroy the native context. + not taken, meaning that \c destroy() will not destroy the native context. \note Some frameworks track the current context and surfaces internally. Making the adopted QOpenGLContext current via Qt will have no effect on such @@ -583,9 +583,9 @@ QVariant QOpenGLContext::nativeHandle() const be used with makeCurrent(), swapBuffers(), etc. \note If the context is already created, this function will first call - destroy(), and then create a new OpenGL context. + \c destroy(), and then create a new OpenGL context. - \sa makeCurrent(), destroy(), format() + \sa makeCurrent(), format() */ bool QOpenGLContext::create() { @@ -613,7 +613,7 @@ bool QOpenGLContext::create() destroying the underlying platform context frees any state associated with the context. - After destroy() has been called, you must call create() if you wish to + After \c destroy() has been called, you must call create() if you wish to use the context again. \note This implicitly calls doneCurrent() if the context is current. @@ -658,10 +658,8 @@ void QOpenGLContext::destroy() /*! Destroys the QOpenGLContext object. - This implicitly calls destroy(), so if this is the current context for the + This implicitly calls \c destroy(), so if this is the current context for the thread, doneCurrent() is also called. - - \sa destroy() */ QOpenGLContext::~QOpenGLContext() { diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index 65a710c3f7..125e59aa5f 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -88,7 +88,7 @@ public: Access to these parameters are useful when implementing custom user interface components, in that they allow the components to exhibit the same behaviour and feel as other components. - \sa QGuiApplication::styleHints(), QPlatformTheme + \sa QGuiApplication::styleHints() */ QStyleHints::QStyleHints() : QObject(*new QStyleHintsPrivate(), 0) -- cgit v1.2.3