diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-06-02 23:06:44 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-06-02 23:39:22 +0000 |
commit | 754efa57d89c62d1796e01b407e9222e67450f52 (patch) | |
tree | ebbe795a4067da7b1e75f5597de2373aaf4ba308 /src/gui | |
parent | f44a59f390be9b67365db8796aa6a54fe9241028 (diff) | |
parent | 166c2499d989919a037a599942fb95beb362971e (diff) |
Merge "Merge remote-tracking branch 'origin/5.5.0' into 5.5" into refs/staging/5.5
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 7 | ||||
-rw-r--r-- | src/gui/kernel/qplatformopenglcontext.cpp | 4 |
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"); } |