qt: Fix keyring copy in tests
* lang/qt/test/t-encrypt.cpp, lang/qt/test/t-tofuinfo.cpp: Assert on copy failure. * lang/qt/test/t-support.cpp (copyKeyrings): Fix path.
This commit is contained in:
parent
4e37d0bb12
commit
c875f07e55
@ -242,7 +242,7 @@ public Q_SLOT:
|
||||
Q_ASSERT(agentConf.open(QIODevice::WriteOnly));
|
||||
agentConf.write("allow-loopback-pinentry");
|
||||
agentConf.close();
|
||||
copyKeyrings(gpgHome, mDir.path());
|
||||
Q_ASSERT(copyKeyrings(gpgHome, mDir.path()));
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -50,7 +50,7 @@ bool QGpgMETest::copyKeyrings(const QString &src, const QString &dest)
|
||||
bool is21dir = QFileInfo(src + QDir::separator() + QStringLiteral("pubring.kbx")).exists();
|
||||
const QString name = is21dir ? QStringLiteral("pubring.kbx") :
|
||||
QStringLiteral("pubring.gpg");
|
||||
if (!QFile::copy(src + name, dest + QDir::separator() + name)) {
|
||||
if (!QFile::copy(src + QDir::separator() + name, dest + QDir::separator() + name)) {
|
||||
return false;
|
||||
}
|
||||
if (!is21dir) {
|
||||
|
@ -239,7 +239,7 @@ private Q_SLOTS:
|
||||
Q_ASSERT(agentConf.open(QIODevice::WriteOnly));
|
||||
agentConf.write("allow-loopback-pinentry");
|
||||
agentConf.close();
|
||||
copyKeyrings(gpgHome, mDir.path());
|
||||
Q_ASSERT(copyKeyrings(gpgHome, mDir.path()));
|
||||
}
|
||||
private:
|
||||
QTemporaryDir mDir;
|
||||
|
Loading…
Reference in New Issue
Block a user