Rename encrypt() so that the code builds with FreeBSD 10.4's libc++, which
has a bug that causes std::bind() to fail with the original function name:
qgpgmeencryptjob.cpp:134:9: error: no matching function for call to 'bind'
run(std::bind(&encrypt,
^~~~~~~~~
/usr/include/c++/v1/functional:2185:1: note: candidate template ignored:
couldn't infer template argument '_Fp'
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
^
/usr/include/c++/v1/functional:2194:1: note: candidate template ignored:
couldn't infer template argument '_Rp'
bind(_Fp&& __f, _BoundArgs&&... __bound_args)
^
1 error generated.
old
|
new
|
void QGpgMEEncryptJob::setOutputIsBase64Encoded(bool o |
66 | 66 | mOutputIsBase64Encoded = on; |
67 | 67 | } |
68 | 68 | |
69 | | static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread, |
| 69 | static QGpgMEEncryptJob::result_type do_encrypt(Context *ctx, QThread *thread, |
70 | 70 | const std::vector<Key> &recipients, |
71 | 71 | const std::weak_ptr<QIODevice> &plainText_, |
72 | 72 | const std::weak_ptr<QIODevice> &cipherText_, |
… |
… |
static QGpgMEEncryptJob::result_type encrypt_qba(Conte |
118 | 118 | if (!buffer->open(QIODevice::ReadOnly)) { |
119 | 119 | assert(!"This should never happen: QBuffer::open() failed"); |
120 | 120 | } |
121 | | return encrypt(ctx, 0, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded); |
| 121 | return do_encrypt(ctx, 0, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded); |
122 | 122 | } |
123 | 123 | |
124 | 124 | Error QGpgMEEncryptJob::start(const std::vector<Key> &recipients, const QByteArray &plainText, bool alwaysTrust) |
… |
… |
Error QGpgMEEncryptJob::start(const std::vector<Key> & |
131 | 131 | void QGpgMEEncryptJob::start(const std::vector<Key> &recipients, const std::shared_ptr<QIODevice> &plainText, |
132 | 132 | const std::shared_ptr<QIODevice> &cipherText, const Context::EncryptionFlags eflags) |
133 | 133 | { |
134 | | run(std::bind(&encrypt, |
| 134 | run(std::bind(&do_encrypt, |
135 | 135 | std::placeholders::_1, std::placeholders::_2, |
136 | 136 | recipients, |
137 | 137 | std::placeholders::_3, std::placeholders::_4, |