Fix build with deprecated API disabled

2 jobs for master in 4 minutes and 51 seconds (queued for 9 minutes and 29 seconds)
Status Name Job ID Coverage
  Build
failed build_clazy_clang_tidy #113054

00:02:23

failed linux kf5-qt5 qt5.15 #113053

00:02:27

 
Name Stage Failure
failed
linux kf5-qt5 qt5.15 Build
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:514: src/kwatchgnupg/CMakeFiles/kwatchgnupg.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Uploading artifacts for failed job
Uploading artifacts...
WARNING: JUnitTestResults.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
build_clazy_clang_tidy Build
[ 15%] Built target test_decryptverifyfilescommand
[ 15%] Built target kleopatraclientgui
make: *** [Makefile:146: all] Error 2
Uploading artifacts for failed job
Uploading artifacts...
WARNING: JUnitTestResults.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1