aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/data.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2023-06-16 12:33:19 +0000
committerAndre Heinecke <[email protected]>2023-06-16 12:33:19 +0000
commit5811d069d3b391e9fd77c1062a2d96be41645422 (patch)
treebcf7cf9fd50d87e350298d69a9fd1d5deb4b900e /lang/cpp/src/data.h
parentcpp: Expose gpgme_data_set_flag through cpp API (diff)
downloadgpgme-5811d069d3b391e9fd77c1062a2d96be41645422.tar.gz
gpgme-5811d069d3b391e9fd77c1062a2d96be41645422.zip
qt, cpp: Support larger size-hint on 32 bit builds
* NEWS: Mention this. * lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::setSizeHint): New. * lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptverifyarchivejob.cpp, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifyopaquejob.cpp: Set size for input IODevice. -- This fixes the case where the old detection of the size of QIOdevice using seek would overflow and instead explicitly uses QIODevice::size to check for the size and pass it through as an uint64. GnuPG-Bug-Id: T6534
Diffstat (limited to '')
-rw-r--r--lang/cpp/src/data.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lang/cpp/src/data.h b/lang/cpp/src/data.h
index ea394804..178bc309 100644
--- a/lang/cpp/src/data.h
+++ b/lang/cpp/src/data.h
@@ -27,6 +27,7 @@
#include "key.h"
#include <sys/types.h> // for size_t, off_t
+#include <cstdint> // unit64_t
#include <cstdio> // FILE
#include <algorithm>
#include <memory>
@@ -125,6 +126,9 @@ public:
/** See gpgme_data_set_flag */
Error setFlag(const char *name, const char *value);
+ /** Set a size hint for this data e.g. for progress calculations. */
+ Error setSizeHint(uint64_t size);
+
class Private;
Private *impl()
{