diff options
Diffstat (limited to 'lang/qt/tests/t-support.cpp')
-rw-r--r-- | lang/qt/tests/t-support.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lang/qt/tests/t-support.cpp b/lang/qt/tests/t-support.cpp index 854dd7bd..e827b517 100644 --- a/lang/qt/tests/t-support.cpp +++ b/lang/qt/tests/t-support.cpp @@ -35,7 +35,8 @@ #endif #include "t-support.h" -#include "context.h" + +#include "job.h" #include <QTest> @@ -44,8 +45,12 @@ #include <QObject> #include <QDir> +#include "context.h" #include "engineinfo.h" +using namespace GpgME; +using namespace QGpgME; + void QGpgMETest::initTestCase() { GpgME::initializeLibrary(); @@ -92,6 +97,17 @@ bool QGpgMETest::copyKeyrings(const QString &src, const QString &dest) return true; } +void QGpgMETest::hookUpPassphraseProvider(GpgME::Context *context) +{ + context->setPassphraseProvider(&mPassphraseProvider); + context->setPinentryMode(Context::PinentryLoopback); +} + +void QGpgMETest::hookUpPassphraseProvider(QGpgME::Job *job) +{ + hookUpPassphraseProvider(Job::context(job)); +} + void killAgent(const QString& dir) { QProcess proc; |