Problems with [Q]GpgME and Qt6

Ron Murray rjmx at rjmx.net
Sat Nov 25 04:15:28 CET 2023


(Crossposting to Qt Forum)
I have an app that works fine in Qt5. I use QGpgME to encrypt/decrypt 
messages and handle key usage. I'm trying to upgrade the app to Qt6, and, 
naturally, expected problems, but this one beats me.
Here, for example, is the code I use to retrieve my secret key list:
QGpgME::KeyListJob *job = QGpgME::openpgp()->keyListJob(false, false, 
false);
// Prepare result vector
std::vector<GpgME::Key> keys;
// Execute it synchronously
GpgME::KeyListResult result = job->exec(QStringList() <<
QStringLiteral(""), // No pattern: get all
true, keys); // Only secret keys
delete job;
Now, this is straight out of the "t-keylist.cpp" test file that comes with 
the GpgME source. It works perfectly well under Qt5. but under Qt6, it 
segfaults at the "job->exec" line. 
Anyone have a clue why it crashes under Qt6?
Thanks,
-- 
Ron Murray <rjmx at rjmx.net <mailto:rjmx at rjmx.net> >
PGP Fingerprint: 4D99 70E3 2317 334B 141E 7B63 12F7 E865 B5E2 E761
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20231125/d6e6e113/attachment.html>


More information about the Gnupg-users mailing list