summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-06-07 17:10:56 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-06-07 17:10:57 +0200
commitfc5da399c3145621c5945d53dde7b37fa463c6e9 (patch)
tree8deec4c78b5add097ba7f2b1e371f27e3ae759c5 /src/gui
parent225dcf355a95f272aaa7ac236c7274e254dca41c (diff)
parenta14a943f9ac3d1e85514d7fb6688c84e624ac850 (diff)
Merge 5.11 into 5.11.1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformcursor.cpp2
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp6
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp7
-rw-r--r--src/gui/painting/qpagesize.cpp6
-rw-r--r--src/gui/painting/qtransform.cpp2
5 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/kernel/qplatformcursor.cpp b/src/gui/kernel/qplatformcursor.cpp
index df78e7d896..bab26f6028 100644
--- a/src/gui/kernel/qplatformcursor.cpp
+++ b/src/gui/kernel/qplatformcursor.cpp
@@ -549,7 +549,7 @@ void QPlatformCursorImage::createSystemCursor(int id)
void QPlatformCursorImage::set(Qt::CursorShape id)
{
QPlatformCursorImage *cursor = 0;
- if (id >= 0 && id <= Qt::LastCursor) {
+ if (unsigned(id) <= unsigned(Qt::LastCursor)) {
if (!systemCursorTable[id])
createSystemCursor(id);
cursor = systemCursorTable[id];
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index fbadb48f70..b456c1ca31 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -664,18 +664,18 @@ QStringList QFileDialogOptions::history() const
void QFileDialogOptions::setLabelText(QFileDialogOptions::DialogLabel label, const QString &text)
{
- if (label >= 0 && label < DialogLabelCount)
+ if (unsigned(label) < unsigned(DialogLabelCount))
d->labels[label] = text;
}
QString QFileDialogOptions::labelText(QFileDialogOptions::DialogLabel label) const
{
- return (label >= 0 && label < DialogLabelCount) ? d->labels[label] : QString();
+ return (unsigned(label) < unsigned(DialogLabelCount)) ? d->labels[label] : QString();
}
bool QFileDialogOptions::isLabelExplicitlySet(DialogLabel label)
{
- return label >= 0 && label < DialogLabelCount && !d->labels[label].isEmpty();
+ return unsigned(label) < unsigned(DialogLabelCount) && !d->labels[label].isEmpty();
}
QUrl QFileDialogOptions::initialDirectory() const
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 469f019a1c..91c25184b6 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -1424,14 +1424,17 @@ QImage QOpenGLFramebufferObject::toImage(bool flipped, int colorAttachmentIndex)
// qt_gl_read_framebuffer doesn't work on a multisample FBO
if (format().samples() != 0) {
QRect rect(QPoint(0, 0), size());
+ QOpenGLFramebufferObjectFormat fmt;
if (extraFuncs->hasOpenGLFeature(QOpenGLFunctions::MultipleRenderTargets)) {
- QOpenGLFramebufferObject temp(d->colorAttachments[colorAttachmentIndex].size, QOpenGLFramebufferObjectFormat());
+ fmt.setInternalTextureFormat(d->colorAttachments[colorAttachmentIndex].internalFormat);
+ QOpenGLFramebufferObject temp(d->colorAttachments[colorAttachmentIndex].size, fmt);
blitFramebuffer(&temp, rect, const_cast<QOpenGLFramebufferObject *>(this), rect,
GL_COLOR_BUFFER_BIT, GL_NEAREST,
colorAttachmentIndex, 0);
image = temp.toImage(flipped);
} else {
- QOpenGLFramebufferObject temp(size(), QOpenGLFramebufferObjectFormat());
+ fmt.setInternalTextureFormat(d->colorAttachments[0].internalFormat);
+ QOpenGLFramebufferObject temp(size(), fmt);
blitFramebuffer(&temp, rect, const_cast<QOpenGLFramebufferObject *>(this), rect);
image = temp.toImage(flipped);
}
diff --git a/src/gui/painting/qpagesize.cpp b/src/gui/painting/qpagesize.cpp
index 8831d60d48..9cbe6ef911 100644
--- a/src/gui/painting/qpagesize.cpp
+++ b/src/gui/painting/qpagesize.cpp
@@ -762,7 +762,7 @@ QPageSizePrivate::QPageSizePrivate(QPageSize::PageSizeId pageSizeId)
m_windowsId(0),
m_units(QPageSize::Point)
{
- if (pageSizeId >= QPageSize::PageSizeId(0) && pageSizeId <= QPageSize::LastPageSize)
+ if (unsigned(pageSizeId) <= unsigned(QPageSize::LastPageSize))
init(pageSizeId, QString());
}
@@ -1478,7 +1478,7 @@ QRect QPageSize::rectPixels(int resolution) const
QString QPageSize::key(PageSizeId pageSizeId)
{
- if (pageSizeId < PageSizeId(0) || pageSizeId > LastPageSize)
+ if (unsigned(pageSizeId) > unsigned(LastPageSize))
return QString();
return QString::fromUtf8(qt_pageSizes[pageSizeId].mediaOption);
}
@@ -1497,7 +1497,7 @@ static QString msgImperialPageSizeInch(int width, int height)
QString QPageSize::name(PageSizeId pageSizeId)
{
- if (pageSizeId < PageSizeId(0) || pageSizeId > LastPageSize)
+ if (unsigned(pageSizeId) > unsigned(LastPageSize))
return QString();
switch (pageSizeId) {
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 7a53c44bc4..c5e296b293 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -352,8 +352,6 @@ QTransform QTransform::transposed() const
QTransform t(affine._m11, affine._m21, affine._dx,
affine._m12, affine._m22, affine._dy,
m_13, m_23, m_33, true);
- t.m_type = m_type;
- t.m_dirty = m_dirty;
return t;
}