summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qevent.cpp10
-rw-r--r--src/gui/kernel/qguiapplication.cpp12
-rw-r--r--src/gui/kernel/qopenglcontext.cpp9
-rw-r--r--src/gui/kernel/qplatformtheme.h1
-rw-r--r--src/gui/kernel/qsurfaceformat.cpp12
5 files changed, 36 insertions, 8 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 295380a93c..92d9871dc5 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -4361,13 +4361,13 @@ void QTouchEvent::TouchPoint::setFlags(InfoFlags flags)
\ingroup events
\inmodule QtGui
- \brief The QScrollPrepareEvent class is send in preparation of a scrolling.
+ \brief The QScrollPrepareEvent class is sent in preparation of scrolling.
- The scroll prepare event is send before scrolling (usually by QScroller) is started.
+ The scroll prepare event is sent before scrolling (usually by QScroller) is started.
The object receiving this event should set viewportSize, maxContentPos and contentPos.
It also should accept this event to indicate that scrolling should be started.
- It is not guaranteed that a QScrollEvent will be send after an acceepted
+ It is not guaranteed that a QScrollEvent will be sent after an acceepted
QScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).
\sa QScrollEvent, QScroller
@@ -4462,9 +4462,9 @@ void QScrollPrepareEvent::setContentPos(const QPointF &pos)
\ingroup events
\inmodule QtGui
- \brief The QScrollEvent class is send when scrolling.
+ \brief The QScrollEvent class is sent when scrolling.
- The scroll event is send to indicate that the receiver should be scrolled.
+ The scroll event is sent to indicate that the receiver should be scrolled.
Usually the receiver should be something visual like QWidget or QGraphicsObject.
Some care should be taken that no conflicting QScrollEvents are sent from two
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index c6376b2647..a19eebfb7c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2294,6 +2294,18 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To
if (w->d_func()->blockedByModalWindow) {
// a modal window is blocking this window, don't allow touch events through
+
+ // QTBUG-37371 temporary fix; TODO: revisit in 5.4 when we have a forwarding solution
+ if (eventType == QEvent::TouchEnd) {
+ // but don't leave dangling state: e.g.
+ // QQuickWindowPrivate::itemForTouchPointId needs to be cleared.
+ QTouchEvent touchEvent(QEvent::TouchCancel,
+ e->device,
+ e->modifiers);
+ touchEvent.setTimestamp(e->timestamp);
+ touchEvent.setWindow(w);
+ QGuiApplication::sendSpontaneousEvent(w, &touchEvent);
+ }
continue;
}
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index fb7d15c160..5087e33b47 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -247,8 +247,8 @@ QMutex QOpenGLContextPrivate::makeCurrentTrackerMutex;
To set up a context, set its screen and format such that they match those
of the surface or surfaces with which the context is meant to be used, if
necessary make it share resources with other contexts with
- setShareContext(), and finally call create(). Use isValid() to check if the
- context was successfully initialized.
+ setShareContext(), and finally call create(). Use the return value or isValid()
+ to check if the context was successfully initialized.
A context can be made current against a given surface by calling
makeCurrent(). When OpenGL rendering is done, call swapBuffers() to swap
@@ -491,7 +491,7 @@ bool QOpenGLContext::create()
d->shareContext = 0;
d->shareGroup = d->shareContext ? d->shareContext->shareGroup() : new QOpenGLContextGroup;
d->shareGroup->d_func()->addContext(this);
- return d->platformGLContext;
+ return isValid();
}
/*!
@@ -578,6 +578,9 @@ bool QOpenGLContext::isValid() const
without having to manage it manually.
The context or a sharing context must be current.
+
+ The returned QOpenGLFunctions instance is ready to be used and it
+ does not need initializeOpenGLFunctions() to be called.
*/
QOpenGLFunctions *QOpenGLContext::functions() const
{
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index 073eda8d07..a2d14be0fb 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -130,6 +130,7 @@ public:
ComboBoxPalette,
ItemViewPalette,
MessageBoxLabelPelette,
+ MessageBoxLabelPalette = MessageBoxLabelPelette,
TabBarPalette,
LabelPalette,
GroupBoxPalette,
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp
index 2b6cb2d949..23c0e59779 100644
--- a/src/gui/kernel/qsurfaceformat.cpp
+++ b/src/gui/kernel/qsurfaceformat.cpp
@@ -522,6 +522,10 @@ int QSurfaceFormat::alphaBufferSize() const
/*!
Set the desired \a size in bits of the red channel of the color buffer.
+
+ \note On Mac OSX, be sure to set the buffer size of all color channels,
+ otherwise this setting will have no effect. If one of the buffer sizes is not set,
+ the current bit-depth of the screen is used.
*/
void QSurfaceFormat::setRedBufferSize(int size)
{
@@ -533,6 +537,10 @@ void QSurfaceFormat::setRedBufferSize(int size)
/*!
Set the desired \a size in bits of the green channel of the color buffer.
+
+ \note On Mac OSX, be sure to set the buffer size of all color channels,
+ otherwise this setting will have no effect. If one of the buffer sizes is not set,
+ the current bit-depth of the screen is used.
*/
void QSurfaceFormat::setGreenBufferSize(int size)
{
@@ -544,6 +552,10 @@ void QSurfaceFormat::setGreenBufferSize(int size)
/*!
Set the desired \a size in bits of the blue channel of the color buffer.
+
+ \note On Mac OSX, be sure to set the buffer size of all color channels,
+ otherwise this setting will have no effect. If one of the buffer sizes is not set,
+ the current bit-depth of the screen is used.
*/
void QSurfaceFormat::setBlueBufferSize(int size)
{