Commit dc059560e73e0b373a6e54e71b07e3af4b692cb4

Authored by Jay Berkenbilt
1 parent 0122f448

Remove QPDFObjectHandle::replaceOrRemoveKey

See ChangeLog for rationale for not deprecating it as originally
planned.
ChangeLog
  1 +2022-04-30 Jay Berkenbilt <ejb@ql.org>
  2 +
  3 + * Remove QPDFObjectHandle::replaceOrRemoveKey. Call replaceKey
  4 + instead. Its functionality is identical. Note: usually I would
  5 + deprecate this for a release cycle, but the release of qpdf 11
  6 + will require virtually all users to touch their source code, so it
  7 + actually seems better to just break this now than to put it off,
  8 + particularly since the fix so trivial.
  9 +
1 2022-04-29 Jay Berkenbilt <ejb@ql.org> 10 2022-04-29 Jay Berkenbilt <ejb@ql.org>
2 11
3 * QPDFObjectHandle: for the methods insertItem, appendItem, 12 * QPDFObjectHandle: for the methods insertItem, appendItem,
include/qpdf/QPDFObjectHandle.hh
@@ -1068,10 +1068,6 @@ class QPDFObjectHandle @@ -1068,10 +1068,6 @@ class QPDFObjectHandle
1068 QPDF_DLL 1068 QPDF_DLL
1069 QPDFObjectHandle removeKeyAndGet(std::string const& key); 1069 QPDFObjectHandle removeKeyAndGet(std::string const& key);
1070 1070
1071 - // ABI: Remove in qpdf 12  
1072 - [[deprecated("use replaceKey -- it does the same thing")]] QPDF_DLL void  
1073 - replaceOrRemoveKey(std::string const& key, QPDFObjectHandle const&);  
1074 -  
1075 // Methods for stream objects 1071 // Methods for stream objects
1076 QPDF_DLL 1072 QPDF_DLL
1077 QPDFObjectHandle getDict(); 1073 QPDFObjectHandle getDict();
libqpdf/QPDFObjectHandle.cc
@@ -1334,13 +1334,6 @@ QPDFObjectHandle::removeKeyAndGet(std::string const&amp; key) @@ -1334,13 +1334,6 @@ QPDFObjectHandle::removeKeyAndGet(std::string const&amp; key)
1334 return result; 1334 return result;
1335 } 1335 }
1336 1336
1337 -void  
1338 -QPDFObjectHandle::replaceOrRemoveKey(  
1339 - std::string const& key, QPDFObjectHandle const& value)  
1340 -{  
1341 - replaceKey(key, value);  
1342 -}  
1343 -  
1344 // Stream accessors 1337 // Stream accessors
1345 QPDFObjectHandle 1338 QPDFObjectHandle
1346 QPDFObjectHandle::getDict() 1339 QPDFObjectHandle::getDict()
manual/release-notes.rst
@@ -64,6 +64,10 @@ For a detailed list of changes, please see the file @@ -64,6 +64,10 @@ For a detailed list of changes, please see the file
64 64
65 - API: breaking changes 65 - API: breaking changes
66 66
  67 + - Remove ``QPDFObjectHandle::replaceOrRemoveKey``. This does the
  68 + same thing as ``QPDFObjectHandle::replaceKey``. Just call
  69 + ``replaceKey`` instead.
  70 +
67 - Remove 71 - Remove
68 ``QPDFAcroFormDocumentHelper::copyFieldsFromForeignPage``. This 72 ``QPDFAcroFormDocumentHelper::copyFieldsFromForeignPage``. This
69 method never worked and only did something in qpdf version 73 method never worked and only did something in qpdf version