Page MenuHome GnuPG

cpp: Port away from gnu deprecated extension
Needs RevisionPublic

Authored by CarlSchwan on Jan 22 2024, 10:45 AM.

Details

Summary
  • lang/cpp/src/gpgmepp_export.h, lang/qt/src/qgpgme_export.h Declare the deprecated macro using the deprecated attribute
  • lang/cpp/src/key.h, lang/qt/src/downloadjob.h, lang/cpp/src/verificationresult.h adapt usage to the deprecated macro being an attribute --

Use instead the standard deprecated macro which is compatible with
all the C++ compilers and not just GCC and clang.

Test Plan

Compiles fine on Linux and with a bunch of other change on MSVC

Diff Detail

Repository
rM GPGME
Branch
work/carl/port-away-gnu-deprecated-extension
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

CarlSchwan created this revision.

For the C++ binding and the Qt 5 binding we require C++ 11. The deprecated attribute was added with C++ 14.

This revision now requires changes to proceed.Jan 22 2024, 4:35 PM

For the C++ binding and the Qt 5 binding we require C++ 11. The deprecated attribute was added with C++ 14.

:(

I see two solutions:

  • make QGPGME_DEPRECATED noop on MSVC
  • use C++14 in the c++ bindings, this is already 9 years old, so likely no issue for any of our consumers