summaryrefslogtreecommitdiff
path: root/lang/qt/tests/t-support.h
diff options
context:
space:
mode:
Diffstat (limited to 'lang/qt/tests/t-support.h')
-rw-r--r--lang/qt/tests/t-support.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index 704fab4..b03b05d 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -34,6 +34,8 @@
#include "interfaces/passphraseprovider.h"
#include <QObject>
+#include <gpg-error.h>
+
namespace GpgME
{
class TestPassphraseProvider : public PassphraseProvider
@@ -42,7 +44,9 @@ public:
char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
{
- return strdup("abc");
+ char *ret;
+ gpgrt_asprintf(&ret, "abc");
+ return ret;
}
};
} // namespace GpgME
@@ -60,4 +64,8 @@ public Q_SLOTS:
void cleanupTestCase();
};
+/* Timeout, in milliseconds, for use with QSignalSpy to wait on
+ signals. */
+#define QSIGNALSPY_TIMEOUT 60000
+
#endif // T_SUPPORT_H