summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <br@blankpage.ch>2009-08-31 16:43:35 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-31 16:43:35 (GMT)
commitd322e54e377edf76b3ff4449659b7221349689d3 (patch)
treeafcae8eae49338612ae9f079f6c2c606e100ea73 /src/gui
parent935c9b6ffe952e28914c3e51c377c07380e6e6c1 (diff)
downloadQt-d322e54e377edf76b3ff4449659b7221349689d3.zip
Qt-d322e54e377edf76b3ff4449659b7221349689d3.tar.gz
Qt-d322e54e377edf76b3ff4449659b7221349689d3.tar.bz2
Qt fails to build with libpng 1.4 betas
Qt expects a trans_values member in png_info_struct; this member has been renamed to trans_color in libpng 1.4. Merge-request: 1317 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qpnghandler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 3f3a55c..b9dcf48 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -205,7 +205,11 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
image.setColor(i, qRgba(c,c,c,0xff));
}
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
+#if PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR < 4)
const int g = info_ptr->trans_values.gray;
+#else
+ const int g = info_ptr->trans_color.gray;
+#endif
if (g < ncols) {
image.setColor(g, 0);
}