Line 0
Link Here
|
|
|
1 |
Rename encrypt() so that the code builds with FreeBSD 10.2/10.3's libc++, which |
2 |
has a bug that causes std::bind() to fail with the original function name: |
3 |
|
4 |
qgpgmeencryptjob.cpp:133:9: error: no matching function for call to 'bind' |
5 |
run(std::bind(&encrypt, |
6 |
^~~~~~~~~ |
7 |
/usr/include/c++/v1/functional:2184:1: note: candidate template ignored: |
8 |
couldn't infer template argument '_Fp' |
9 |
bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
10 |
^ |
11 |
/usr/include/c++/v1/functional:2193:1: note: candidate template ignored: |
12 |
couldn't infer template argument '_Rp' |
13 |
bind(_Fp&& __f, _BoundArgs&&... __bound_args) |
14 |
^ |
15 |
1 error generated. |
16 |
|
17 |
--- lang/qt/src/qgpgmeencryptjob.cpp.orig 2016-10-18 17:22:02 UTC |
18 |
+++ lang/qt/src/qgpgmeencryptjob.cpp |
19 |
@@ -65,7 +65,7 @@ void QGpgMEEncryptJob::setOutputIsBase64 |
20 |
mOutputIsBase64Encoded = on; |
21 |
} |
22 |
|
23 |
-static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread, |
24 |
+static QGpgMEEncryptJob::result_type do_encrypt(Context *ctx, QThread *thread, |
25 |
const std::vector<Key> &recipients, |
26 |
const std::weak_ptr<QIODevice> &plainText_, |
27 |
const std::weak_ptr<QIODevice> &cipherText_, |
28 |
@@ -117,7 +117,7 @@ static QGpgMEEncryptJob::result_type enc |
29 |
if (!buffer->open(QIODevice::ReadOnly)) { |
30 |
assert(!"This should never happen: QBuffer::open() failed"); |
31 |
} |
32 |
- return encrypt(ctx, 0, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded); |
33 |
+ return do_encrypt(ctx, 0, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded); |
34 |
} |
35 |
|
36 |
Error QGpgMEEncryptJob::start(const std::vector<Key> &recipients, const QByteArray &plainText, bool alwaysTrust) |
37 |
@@ -130,7 +130,7 @@ Error QGpgMEEncryptJob::start(const std: |
38 |
void QGpgMEEncryptJob::start(const std::vector<Key> &recipients, const std::shared_ptr<QIODevice> &plainText, |
39 |
const std::shared_ptr<QIODevice> &cipherText, const Context::EncryptionFlags eflags) |
40 |
{ |
41 |
- run(std::bind(&encrypt, |
42 |
+ run(std::bind(&do_encrypt, |
43 |
std::placeholders::_1, std::placeholders::_2, |
44 |
recipients, |
45 |
std::placeholders::_3, std::placeholders::_4, |