diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-09-01 10:45:36 (GMT) |
---|---|---|
committer | Sergio Ahumada <sergio.ahumada@nokia.com> | 2011-09-01 10:47:02 (GMT) |
commit | 47ec2fd2193f56e02a402df4d0fa9f1b521d07fc (patch) | |
tree | d4d0af46486c486b25253fde8d4550844dc66dd3 /src/gui | |
parent | 274619e086e6e9ebba6c383ffb837dc140c840e7 (diff) | |
parent | cac60dcca5b4632173a8fe76a78cd2ec9bea5873 (diff) | |
download | Qt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.zip Qt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.tar.gz Qt-47ec2fd2193f56e02a402df4d0fa9f1b521d07fc.tar.bz2 |
Merge branch 4.8 into qt-4.8-from-4.7
Conflicts:
tools/qdoc3/ditaxmlgenerator.cpp
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 23 | ||||
-rw-r--r-- | src/gui/kernel/qevent.cpp | 3 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index f7d07a5..1714442 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -58,6 +58,29 @@ #include <pngconf.h> #endif +#if PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER <= 10502 \ + && defined(PNG_PEDANTIC_WARNINGS_SUPPORTED) +/* + Versions 1.4.0 to 1.5.2 of libpng declare png_longjmp_ptr to + have a noreturn attribute if PNG_PEDANTIC_WARNINGS_SUPPORTED + is enabled, but most declarations of longjmp in the wild do + not add this attribute. This causes problems when the png_jmpbuf + macro expands to calling png_set_longjmp_fn with a mismatched + longjmp, as compilers such as Clang will treat this as an error. + + To work around this we override the png_jmpbuf macro to cast + longjmp to a png_longjmp_ptr. +*/ +# undef png_jmpbuf +# ifdef PNG_SETJMP_SUPPORTED +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))) +# else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +# endif +#endif + #ifdef Q_OS_WINCE #define CALLBACK_CALL_TYPE __cdecl #else diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index de2d87e..e1df267 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -142,8 +142,7 @@ QInputEvent::~QInputEvent() and QWidget::mouseMoveEvent() to receive mouse events in your own widgets. - \sa QWidget::setMouseTracking() QWidget::grabMouse() - QCursor::pos() + \sa QWidget::setMouseTracking() QWidget::grabMouse() QCursor::pos() */ /*! |