diff options
author | adridg <adridg@FreeBSD.org> | 2018-03-20 21:01:42 +0800 |
---|---|---|
committer | adridg <adridg@FreeBSD.org> | 2018-03-20 21:01:42 +0800 |
commit | c37795dde756682916d4b5282016ae36c8c410de (patch) | |
tree | 3d7a3c191522a9243d32012d3905303d7e0e9d95 | |
parent | 32e52702669b57bccd1e9bcd81dd0641c6d09d2d (diff) | |
download | freebsd-ports-gnome-c37795dde756682916d4b5282016ae36c8c410de.tar.gz freebsd-ports-gnome-c37795dde756682916d4b5282016ae36c8c410de.tar.zst freebsd-ports-gnome-c37795dde756682916d4b5282016ae36c8c410de.zip |
Fix graphics/dspdfviewer build with modern Clang. The error message
is in the (new) patch.
PR: 226524
Approved by: tcberner (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D14652
-rw-r--r-- | graphics/dspdfviewer/files/patch-hyperlinkarea.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/graphics/dspdfviewer/files/patch-hyperlinkarea.cpp b/graphics/dspdfviewer/files/patch-hyperlinkarea.cpp new file mode 100644 index 000000000000..9425de3dea17 --- /dev/null +++ b/graphics/dspdfviewer/files/patch-hyperlinkarea.cpp @@ -0,0 +1,18 @@ +Fix build with modern Clang + +../hyperlinkarea.cpp:35:18: error: zero as null pointer constant [-Werror,-Wzero-as-null-pointer-constant] + if ( pixmap == 0 ) + ^ + nullptr + +--- hyperlinkarea.cpp.orig 2018-03-11 12:58:40 UTC ++++ hyperlinkarea.cpp +@@ -32,7 +32,7 @@ HyperlinkArea::HyperlinkArea(QLabel* ima + throw WrongLinkType(); + QRect mySize; + const QPixmap* pixmap = imageLabel->pixmap(); +- if ( pixmap == 0 ) ++ if ( pixmap == nullptr ) + throw /** FIXME Exception **/ std::runtime_error("Tried to construct a HyperlinkArea from an image label without a pixmap"); + + QRectF sizeWithinImageLabel = link.linkArea(); |