[evince/ignore-deprecations-in-headers] libdocument: Ignore deprecation warnings in headers



commit b5b7212473e9e225c00e7ec0f766995a7d2725db
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Mon Mar 9 15:29:52 2020 -0700

    libdocument: Ignore deprecation warnings in headers
    
    GTime is deprecated, but there's no point in generating deprecation
    warnings for projects that include these header files (which won't
    change). Warnings are still generated for the corresponding C code.

 libdocument/ev-annotation.h    | 2 ++
 libdocument/ev-attachment.h    | 4 ++++
 libdocument/ev-document-info.h | 2 ++
 libdocument/ev-document-misc.h | 2 ++
 4 files changed, 10 insertions(+)
---
diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h
index 1fe98fe3..69c6686f 100644
--- a/libdocument/ev-annotation.h
+++ b/libdocument/ev-annotation.h
@@ -132,8 +132,10 @@ gboolean             ev_annotation_set_name                  (EvAnnotation
 const gchar         *ev_annotation_get_modified              (EvAnnotation           *annot);
 gboolean             ev_annotation_set_modified              (EvAnnotation           *annot,
                                                              const gchar            *modified);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 gboolean             ev_annotation_set_modified_from_time    (EvAnnotation           *annot,
                                                              GTime                   utime);
+G_GNUC_END_IGNORE_DEPRECATIONS
 EV_DEPRECATED_FOR(ev_annotaion_get_rgba)
 void                 ev_annotation_get_color                 (EvAnnotation           *annot,
                                                              GdkColor               *color);
diff --git a/libdocument/ev-attachment.h b/libdocument/ev-attachment.h
index a3d70c02..f98561b4 100644
--- a/libdocument/ev-attachment.h
+++ b/libdocument/ev-attachment.h
@@ -51,17 +51,21 @@ struct _EvAttachmentClass {
 
 GType         ev_attachment_get_type             (void) G_GNUC_CONST;
 GQuark        ev_attachment_error_quark          (void) G_GNUC_CONST;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 EvAttachment *ev_attachment_new                  (const gchar  *name,
                                                  const gchar  *description,
                                                  GTime         mtime,
                                                  GTime         ctime,
                                                  gsize         size,
                                                  gpointer      data);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 const gchar *ev_attachment_get_name              (EvAttachment *attachment);
 const gchar *ev_attachment_get_description       (EvAttachment *attachment);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 GTime        ev_attachment_get_modification_date (EvAttachment *attachment);
 GTime        ev_attachment_get_creation_date     (EvAttachment *attachment);
+G_GNUC_END_IGNORE_DEPRECATIONS
 const gchar *ev_attachment_get_mime_type         (EvAttachment *attachment);
 gboolean     ev_attachment_save                  (EvAttachment *attachment,
                                                  GFile        *file,
diff --git a/libdocument/ev-document-info.h b/libdocument/ev-document-info.h
index 586bf284..e857b4b1 100644
--- a/libdocument/ev-document-info.h
+++ b/libdocument/ev-document-info.h
@@ -104,6 +104,7 @@ typedef enum
 
 } EvDocumentInfoFields;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 struct _EvDocumentInfo
 {
        char *title;
@@ -129,6 +130,7 @@ struct _EvDocumentInfo
        /* Mask of all the valid fields */
        guint fields_mask;
 };
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 GType           ev_document_info_get_type (void) G_GNUC_CONST;
 EvDocumentInfo *ev_document_info_copy     (EvDocumentInfo *info);
diff --git a/libdocument/ev-document-misc.h b/libdocument/ev-document-misc.h
index bb2fe171..4c644eb9 100644
--- a/libdocument/ev-document-misc.h
+++ b/libdocument/ev-document-misc.h
@@ -84,7 +84,9 @@ EV_DEPRECATED_FOR(ev_document_misc_get_widget_dpi)
 gdouble          ev_document_misc_get_screen_dpi (GdkScreen *screen);
 gdouble          ev_document_misc_get_widget_dpi (GtkWidget *widget);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 gchar           *ev_document_misc_format_date (GTime utime);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 void             ev_document_misc_get_pointer_position (GtkWidget *widget,
                                                        gint      *x,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]