Commit 20bd34e395cc0d4ce6c70b487b0bd4455a461633

Authored by Jay Berkenbilt
Committed by GitHub
2 parents 9685176c 6f13959b

Merge pull request #1376 from jberkenbilt/object-h-comment

Clean up comments in QPDFObject.hh
include/qpdf/QPDFObject.hh
... ... @@ -23,14 +23,14 @@
23 23 #ifndef QPDFOBJECT_OLD_HH
24 24 #define QPDFOBJECT_OLD_HH
25 25  
26   -// This file exists so that if anyone still includes <qpdf/QPDFObject.hh>
27   -// and has been ignoring the warning, they will get an error. This reduces
28   -// the chances of someone accidentally including the file from an
29   -// installed, old version. The QPDFObject API, which is not part of the
30   -// public API, is defined in QPDFObject_private.hh. Prior to qpdf 11, this
31   -// file was exposed for some constants. This error was introduced in qpdf
32   -// 12.
  26 +// Current code should not include <qpdf/QPDFObject.hh>. This file exists
  27 +// to ensure that code that includes it doesn't accidentally work because
  28 +// of an old qpdf installed on the system. Including this file became an
  29 +// error with qpdf version 12. The internal QPDFObject API is defined in
  30 +// QPDFObject_private.hh, which is not part of the public API.
33 31  
34   -#error "QPDFObject.hh is no longer a valid QPDF Header file"
  32 +// Instead of including this header, include <qpdf/Constants.h>, and
  33 +// replace `QPDFObject::ot_` with `::ot_` in your code.
  34 +#error "QPDFObject.hh is obsolete; see comments in QPDFObject.hh for details"
35 35  
36 36 #endif // QPDFOBJECT_OLD_HH
... ...
manual/release-notes.rst
... ... @@ -18,7 +18,9 @@ more detail.
18 18 - The header file ``qpdf/QPDFObject.hh`` now generates an error if
19 19 included. This is to prevent code that includes it from
20 20 accidentally working because an old version is installed
21   - somewhere on the system.
  21 + somewhere on the system. Instead of including that header,
  22 + include ``<qpdf/Constants.h>``, and replace ``QPDFObject::ot_``
  23 + with ``::ot_`` in your code.
22 24  
23 25 - ``QPDFObjectHandle::replaceOrRemoveKey`` has been removed since
24 26 it was identical to ``QPDFObjectHandle::replaceKey``.
... ...