aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qt/tests/t-support.h
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-01-13 11:40:35 +0000
committerIngo Klöcker <[email protected]>2022-01-13 11:40:35 +0000
commitd308910cdfb31accae7cf790a956eb2f3cc6ae71 (patch)
treedf337883072d4ea5c7e01ab04cab84449665be54 /lang/qt/tests/t-support.h
parentqt,tests: Add asyncDone signal to base class of all tests (diff)
downloadgpgme-d308910cdfb31accae7cf790a956eb2f3cc6ae71.tar.gz
gpgme-d308910cdfb31accae7cf790a956eb2f3cc6ae71.zip
qt,tests: Add helper to hook up the test passphrase provider
* lang/qt/tests/t-support.h, lang/qt/tests/t-support.cpp (class QGpgMETest): Add member function hookUpPassphraseProvider. Add member mPassphraseProvider. * lang/qt/tests/t-changeexpiryjob.cpp, lang/qt/tests/t-encrypt.cpp, lang/qt/tests/t-remarks.cpp, lang/qt/tests/t-tofuinfo.cpp, lang/qt/tests/t-trustsignatures.cpp, lang/qt/tests/t-various.cpp: Use new helper. -- GnuPG-bug-id: 5770
Diffstat (limited to 'lang/qt/tests/t-support.h')
-rw-r--r--lang/qt/tests/t-support.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index 0cff0c17..0d5757c8 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -38,6 +38,16 @@
#include <gpg-error.h>
+namespace GpgME
+{
+class Context;
+}
+
+namespace QGpgME
+{
+class Job;
+}
+
namespace QTest
{
template <>
@@ -78,9 +88,15 @@ protected:
bool copyKeyrings(const QString &from, const QString& to);
+ void hookUpPassphraseProvider(GpgME::Context *context);
+ void hookUpPassphraseProvider(QGpgME::Job *job);
+
public Q_SLOTS:
void initTestCase();
void cleanupTestCase();
+
+private:
+ GpgME::TestPassphraseProvider mPassphraseProvider;
};
/* Timeout, in milliseconds, for use with QSignalSpy to wait on