summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-06-02 09:43:46 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-06-02 09:44:03 +0200
commit166c2499d989919a037a599942fb95beb362971e (patch)
tree748e58d2ed42422aae1e32a28f57180f5bb1cbea /src/gui
parentf7047d52da47a8426189d0aff8c5104b23cbfd89 (diff)
parent7bc9310a2265e14b6880aa29d96adba6d3d7aed0 (diff)
Merge remote-tracking branch 'origin/5.5.0' into 5.5
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qpnghandler.cpp7
-rw-r--r--src/gui/kernel/qplatformopenglcontext.cpp4
2 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 3c88d2e9c1..7fbd24787e 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -676,16 +676,9 @@ QImage::Format QPngHandlerPrivate::readImageFormat()
&& num_palette <= 256)
{
// 1-bit and 8-bit color
- if (bit_depth != 1)
- png_set_packing(png_ptr);
- png_read_update_info(png_ptr, info_ptr);
- png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
format = bit_depth == 1 ? QImage::Format_Mono : QImage::Format_Indexed8;
} else {
// 32-bit
- if (bit_depth == 16)
- png_set_strip_16(png_ptr);
-
format = QImage::Format_ARGB32;
// Only add filler if no alpha, or we can get 5 channel data.
if (!(color_type & PNG_COLOR_MASK_ALPHA)
diff --git a/src/gui/kernel/qplatformopenglcontext.cpp b/src/gui/kernel/qplatformopenglcontext.cpp
index b9cf81b30e..f98f8a496c 100644
--- a/src/gui/kernel/qplatformopenglcontext.cpp
+++ b/src/gui/kernel/qplatformopenglcontext.cpp
@@ -131,6 +131,10 @@ bool QPlatformOpenGLContext::parseOpenGLVersion(const QByteArray &versionString,
if (versionParts.size() >= 2) {
major = versionParts.at(0).toInt(&majorOk);
minor = versionParts.at(1).toInt(&minorOk);
+ // Nexus 6 has "OpenGL ES 3.0V@95.0 (GIT@I86da836d38)"
+ if (!minorOk)
+ if (int idx = versionParts.at(1).indexOf('V'))
+ minor = versionParts.at(1).left(idx).toInt(&minorOk);
} else {
qWarning("Unrecognized OpenGL ES version");
}