summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-11-04 11:39:15 +0100
committerLiang Qi <liang.qi@qt.io>2016-11-04 11:39:15 +0100
commite918605f4238841596a1723a0a8592ec152dc723 (patch)
tree1c00298abfd5dbb47cb4125b22f37f14fcdbe4d8 /src/gui
parent1a1a0e31590a5a7f360a86de5c34a2aec8e17157 (diff)
parent15df60239d2dd3b0f0844e3ec8c91300fb7a4b67 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/corelib/json/qjsonparser.cpp src/gui/opengl/qopengl.cpp Change-Id: Ib4d3208398399691839e6c6eaeb9006f99e3a62b
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/opengl/qopengl.cpp6
-rw-r--r--src/gui/painting/qdrawhelper.cpp12
3 files changed, 13 insertions, 7 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index db118edf04..0d2f55b1c2 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -303,7 +303,7 @@ QPixmap QPixmapIconEngine::pixmap(const QSize &size, QIcon::Mode mode, QIcon::St
QString key = QLatin1String("qt_")
% HexString<quint64>(pm.cacheKey())
- % HexString<uint>(pe->mode)
+ % HexString<uint>(pe ? pe->mode : QIcon::Normal)
% HexString<quint64>(QGuiApplication::palette().cacheKey())
% HexString<uint>(actualSize.width())
% HexString<uint>(actualSize.height());
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index 1a8fc599ce..eb08492254 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -135,9 +135,6 @@ QDebug operator<<(QDebug d, const QOpenGLConfig::Gpu &g)
return d;
}
-enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan };
-static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="};
-
typedef QJsonArray::ConstIterator JsonArrayConstIt;
static inline bool contains(const QJsonArray &haystack, unsigned needle)
@@ -159,6 +156,9 @@ static inline bool contains(const QJsonArray &haystack, const QString &needle)
}
namespace {
+enum Operator { NotEqual, LessThan, LessEqualThan, Equals, GreaterThan, GreaterEqualThan };
+static const char operators[][3] = {"!=", "<", "<=", "=", ">", ">="};
+
// VersionTerm describing a version term consisting of number and operator
// found in os.version and driver_version.
struct VersionTerm {
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 1c772ef232..2c810e4870 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -4508,8 +4508,10 @@ static void blend_tiled_argb(int count, const QSpan *spans, void *userData)
uint *dest = ((uint *)data->rasterBuffer->scanLine(spans->y)) + x;
op.func(dest, src, l, coverage);
x += l;
+ sx += l;
length -= l;
- sx = 0;
+ if (sx >= image_width)
+ sx = 0;
}
++spans;
}
@@ -4567,7 +4569,9 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
memcpy(dest, src, l * sizeof(quint16));
length -= l;
tx += l;
- sx = 0;
+ sx += l;
+ if (sx >= image_width)
+ sx = 0;
}
// Now use the rasterBuffer as the source of the texture,
@@ -4600,8 +4604,10 @@ static void blend_tiled_rgb565(int count, const QSpan *spans, void *userData)
const quint16 *src = (const quint16 *)data->texture.scanLine(sy) + sx;
blend_sourceOver_rgb16_rgb16(dest, src, l, alpha, ialpha);
x += l;
+ sx += l;
length -= l;
- sx = 0;
+ if (sx >= image_width)
+ sx = 0;
}
}
}