summaryrefslogtreecommitdiff
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/kernel.pri2
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
-rw-r--r--src/gui/kernel/qopenglcontext.cpp5
-rw-r--r--src/gui/kernel/qopenglcontext_p.h2
-rw-r--r--src/gui/kernel/qwindow.cpp3
5 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri
index 3b7e03a0ff..792ca9fbaf 100644
--- a/src/gui/kernel/kernel.pri
+++ b/src/gui/kernel/kernel.pri
@@ -139,7 +139,7 @@ SOURCES += \
kernel/qhighdpiscaling.cpp
-qtConfig(opengl(es2)?) {
+qtConfig(opengl) {
HEADERS += \
kernel/qplatformopenglcontext.h \
kernel/qopenglcontext.h \
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index 1085b546a7..085652879c 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -343,8 +343,10 @@ static const char scaleFactorProperty[] = "_q_scaleFactor";
*/
void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor)
{
- m_screenFactorSet = true;
- m_active = true;
+ if (!qFuzzyCompare(factor, qreal(1))) {
+ m_screenFactorSet = true;
+ m_active = true;
+ }
screen->setProperty(scaleFactorProperty, QVariant(factor));
// hack to force re-evaluation of screen geometry
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 7e5697e5d8..8aea593bf0 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -848,14 +848,15 @@ QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionP
// Create object if suitable one not cached
QAbstractOpenGLFunctions* funcs = 0;
- if (!d->versionFunctions.contains(vp)) {
+ auto it = d->versionFunctions.constFind(vp);
+ if (it == d->versionFunctions.constEnd()) {
funcs = QOpenGLVersionFunctionsFactory::create(vp);
if (funcs) {
funcs->setOwningContext(this);
d->versionFunctions.insert(vp, funcs);
}
} else {
- funcs = d->versionFunctions.value(vp);
+ funcs = it.value();
}
if (funcs && QOpenGLContext::currentContext() == this)
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 57f70356b8..64bf55beee 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -266,7 +266,7 @@ public:
static QOpenGLContextPrivate *get(QOpenGLContext *context)
{
- return context->d_func();
+ return context ? context->d_func() : Q_NULLPTR;
}
#if !defined(QT_NO_DEBUG)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index ca29906fad..124e997c58 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2553,6 +2553,9 @@ void QWindowPrivate::_q_clearAlert()
See the \l{Qt::CursorShape}{list of predefined cursor objects} for a
range of useful shapes.
+ If no cursor has been set, or after a call to unsetCursor(), the
+ parent window's cursor is used.
+
By default, the cursor has the Qt::ArrowCursor shape.
Some underlying window implementations will reset the cursor if it