summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qguiapplication.cpp6
-rw-r--r--src/gui/kernel/qwindow.cpp2
-rw-r--r--src/gui/opengl/qopenglshaderprogram.cpp14
-rw-r--r--src/gui/painting/qdrawhelper.cpp7
-rw-r--r--src/gui/text/qrawfont.cpp16
5 files changed, 33 insertions, 12 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 16add8f627..d8457bc041 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1203,12 +1203,6 @@ static void init_plugins(const QList<QByteArray> &pluginList)
void QGuiApplicationPrivate::createPlatformIntegration()
{
- // Use the Qt menus by default. Platform plugins that
- // want to enable a native menu implementation can clear
- // this flag.
- QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true);
-
-
QHighDpiScaling::initHighDpiScaling();
// Load the platform integration
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 23e783fcb4..edb65a2d4c 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2395,7 +2395,7 @@ void QWindowPrivate::maybeQuitOnLastWindowClosed()
bool lastWindowClosed = true;
for (int i = 0; i < list.size(); ++i) {
QWindow *w = list.at(i);
- if (!w->isVisible() || w->transientParent())
+ if (!w->isVisible() || w->transientParent() || w->type() == Qt::ToolTip)
continue;
lastWindowClosed = false;
break;
diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp
index f076e10e20..61343e5f5a 100644
--- a/src/gui/opengl/qopenglshaderprogram.cpp
+++ b/src/gui/opengl/qopenglshaderprogram.cpp
@@ -523,16 +523,26 @@ bool QOpenGLShader::compileSourceCode(const char *source)
QVarLengthArray<const char *, 5> sourceChunks;
QVarLengthArray<GLint, 5> sourceChunkLengths;
+ QOpenGLContext *ctx = QOpenGLContext::currentContext();
if (versionDirectivePosition.hasPosition()) {
- // Append source up to #version directive
+ // Append source up to and including the #version directive
sourceChunks.append(source);
sourceChunkLengths.append(GLint(versionDirectivePosition.position));
+ } else {
+ // QTBUG-55733: Intel on Windows with Compatibility profile requires a #version always
+ if (ctx->format().profile() == QSurfaceFormat::CompatibilityProfile) {
+ const char *vendor = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_VENDOR));
+ if (vendor && !strcmp(vendor, "Intel")) {
+ static const char version110[] = "#version 110\n";
+ sourceChunks.append(version110);
+ sourceChunkLengths.append(GLint(sizeof(version110)) - 1);
+ }
+ }
}
// The precision qualifiers are useful on OpenGL/ES systems,
// but usually not present on desktop systems.
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
const QSurfaceFormat currentSurfaceFormat = ctx->format();
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(QOpenGLContext::currentContext());
if (currentSurfaceFormat.renderableType() == QSurfaceFormat::OpenGL
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 7685f7f4ca..3e01d34cb2 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -5331,15 +5331,16 @@ static void qt_gradient_quint16(int count, const QSpan *spans, void *userData)
int yinc = int((linear.dy * data->m22 * gss) * FIXPT_SIZE);
int off = int((((linear.dy * (data->m22 * qreal(0.5) + data->dy) + linear.off) * gss) * FIXPT_SIZE));
- QRgba64 oldColor = data->solid.color;
+ // Save the fillData since we overwrite it when setting solid.color.
+ QGradientData gradient = data->gradient;
while (count--) {
int y = spans->y;
- data->solid.color = QRgba64::fromArgb32(qt_gradient_pixel_fixed(&data->gradient, yinc * y + off));
+ data->solid.color = QRgba64::fromArgb32(qt_gradient_pixel_fixed(&gradient, yinc * y + off));
blend_color_rgb16(1, spans, userData);
++spans;
}
- data->solid.color = oldColor;
+ data->gradient = gradient;
} else {
blend_src_generic(count, spans, userData);
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 4d567b26c2..886cf5ef39 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -324,6 +324,13 @@ bool QRawFont::operator==(const QRawFont &other) const
/*!
Returns the ascent of this QRawFont in pixel units.
+ The ascent of a font is the distance from the baseline to the
+ highest position characters extend to. In practice, some font
+ designers break this rule, e.g. when they put more than one accent
+ on top of a character, or to accommodate an unusual character in
+ an exotic language, so it is possible (though rare) that this
+ value will be too small.
+
\sa QFontMetricsF::ascent()
*/
qreal QRawFont::ascent() const
@@ -351,6 +358,11 @@ qreal QRawFont::capHeight() const
/*!
Returns the descent of this QRawFont in pixel units.
+ The descent is the distance from the base line to the lowest point
+ characters extend to. In practice, some font designers break this rule,
+ e.g. to accommodate an unusual character in an exotic language, so
+ it is possible (though rare) that this value will be too small.
+
\sa QFontMetricsF::descent()
*/
qreal QRawFont::descent() const
@@ -361,6 +373,8 @@ qreal QRawFont::descent() const
/*!
Returns the xHeight of this QRawFont in pixel units.
+ This is often but not always the same as the height of the character 'x'.
+
\sa QFontMetricsF::xHeight()
*/
qreal QRawFont::xHeight() const
@@ -371,6 +385,8 @@ qreal QRawFont::xHeight() const
/*!
Returns the leading of this QRawFont in pixel units.
+ This is the natural inter-line spacing.
+
\sa QFontMetricsF::leading()
*/
qreal QRawFont::leading() const