Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Use old style connects in WoT widget

Again the new style connects fail to connect with QGpgME on
Windows.
parent a13d5f2b
......@@ -88,36 +88,18 @@ public:
return;
}
connect(job, &QGpgME::KeyListJob::result,
q, [this](GpgME::KeyListResult result, std::vector<GpgME::Key>, QString, GpgME::Error) {
signatureListingDone(result);
});
connect(job, &QGpgME::KeyListJob::nextKey,
q, [this](const GpgME::Key &key) {
signatureListingNextKey (key);
});
job->start(QStringList(QString::fromLatin1(key.primaryFingerprint())));
keyListJob = job;
}
/* Old style connect here again as QGPGME newstyle connects with
* default arguments don't work on windows. */
void signatureListingNextKey(const GpgME::Key &key)
{
GpgME::Key merged = key;
merged.mergeWith(this->key);
q->setKey(merged);
}
connect(job, SIGNAL(result(GpgME::KeyListResult)),
q, SLOT(signatureListingDone(GpgME::KeyListResult)));
void signatureListingDone(const GpgME::KeyListResult &result)
{
if (result.error()) {
KMessageBox::information(q, xi18nc("@info",
"<para>An error occurred while loading the certifications: "
"<message>%1</message></para>",
QString::fromLocal8Bit(result.error().asString())),
i18nc("@title", "Certifications Loading Failed"));
}
keyListJob = nullptr;
connect(job, SIGNAL(nextKey(GpgME::Key)),
q, SLOT(signatureListingNextKey(GpgME::Key)));
job->start(QStringList(QString::fromLatin1(key.primaryFingerprint())));
keyListJob = job;
}
GpgME::Key key;
......@@ -158,3 +140,23 @@ void WebOfTrustWidget::setKey(const GpgME::Key &key)
WebOfTrustWidget::~WebOfTrustWidget()
{
}
void WebOfTrustWidget::signatureListingNextKey(const GpgME::Key &key)
{
GpgME::Key merged = key;
merged.mergeWith(d->key);
setKey(merged);
}
void WebOfTrustWidget::signatureListingDone(const GpgME::KeyListResult &result)
{
if (result.error()) {
KMessageBox::information(this, xi18nc("@info",
"<para>An error occurred while loading the certifications: "
"<message>%1</message></para>",
QString::fromLocal8Bit(result.error().asString())),
i18nc("@title", "Certifications Loading Failed"));
}
d->keyListJob = nullptr;
}
......@@ -22,6 +22,7 @@
namespace GpgME {
class Key;
class KeyListResult;
}
namespace Kleo {
......@@ -37,6 +38,10 @@ public:
void setKey(const GpgME::Key &key);
GpgME::Key key() const;
private Q_SLOTS:
void signatureListingNextKey(const GpgME::Key &key);
void signatureListingDone(const GpgME::KeyListResult &result);
private:
class Private;
const QScopedPointer<Private> d;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment