File 0001-Fix-warning-on-deprecated-Poppler-Annotation-window.patch of Package mingw32-poppler
From f62a382d248ddf424d6bc7c50d64c0e1725e2207 Mon Sep 17 00:00:00 2001
From: Hib Eris <hib@hiberis.nl>
Date: Sun, 2 Dec 2012 15:54:06 +0100
Subject: [PATCH] Fix warning on deprecated Poppler::Annotation::window
The use of Poppler::Annotation::window is deprecated for
external use, but its use cannot be avoided internally
in the class constructor as long as it is not removed
completely.
Fixes warning:
CXX libpoppler_qt4_la-poppler-annotation.lo
poppler-annotation.cc: In constructor 'Poppler::Annotation::Annotation(Poppler::AnnotationPrivate&)':
poppler-annotation.cc:789:18: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
poppler-annotation.cc:791:5: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
poppler-annotation.cc:791:20: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
poppler-annotation.cc: In constructor 'Poppler::Annotation::Annotation(Poppler::AnnotationPrivate&, const QDomNode&)':
poppler-annotation.cc:799:18: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
poppler-annotation.cc:803:5: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
poppler-annotation.cc:803:20: warning: 'Poppler::Annotation::window' is deprecated (declared at poppler-annotation.h:248) [-Wdeprecated-declarations]
---
qt4/src/poppler-annotation.cc | 4 ++++
qt4/src/poppler-annotation.h | 5 ++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc
index 5fd8d93..3fed223 100644
--- a/qt4/src/poppler-annotation.cc
+++ b/qt4/src/poppler-annotation.cc
@@ -22,6 +22,10 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifndef _POPPLER_ANNOTATION_CC_
+#define _POPPLER_ANNOTATION_CC_
+#endif
+
// qt/kde includes
#include <QtCore/QRegExp>
#include <QtCore/QtAlgorithms>
diff --git a/qt4/src/poppler-annotation.h b/qt4/src/poppler-annotation.h
index 9208ca7..02d6f77 100644
--- a/qt4/src/poppler-annotation.h
+++ b/qt4/src/poppler-annotation.h
@@ -245,7 +245,10 @@ class POPPLER_QT4_EXPORT Annotation
/// \cond PRIVATE
// This field is deprecated and not used any more. Use popup
- Q_DECL_DEPRECATED struct { int width, height; } window; // Always set to zero
+#ifndef _POPPLER_ANNOTATION_CC_
+ Q_DECL_DEPRECATED
+#endif
+ struct { int width, height; } window; // Always set to zero
/// \endcond
/// \since 0.20
--
1.7.5.4