Verified Commit 5639dc83 authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Make it optional to skip resultpage for new key

This is intended for organisations who have clear
processes to lead their users most simply through
the key creation process.

The old behavior is still the default.

GnuPG-Bug-Id: T5181
parent af653224
Pipeline #45545 passed with stage
in 19 minutes and 16 seconds
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "commands/exportopenpgpcertstoservercommand.h" #include "commands/exportopenpgpcertstoservercommand.h"
#include "commands/exportcertificatecommand.h" #include "commands/exportcertificatecommand.h"
#include "kleopatraapplication.h"
#include "utils/validation.h" #include "utils/validation.h"
#include "utils/filedialog.h" #include "utils/filedialog.h"
#include "utils/keyparameters.h" #include "utils/keyparameters.h"
...@@ -945,7 +947,18 @@ private Q_SLOTS: ...@@ -945,7 +947,18 @@ private Q_SLOTS:
QString::fromLatin1(result.fingerprint()) : QString()); QString::fromLatin1(result.fingerprint()) : QString());
job = nullptr; job = nullptr;
Q_EMIT completeChanged(); Q_EMIT completeChanged();
QMetaObject::invokeMethod(wizard(), "next", Qt::QueuedConnection); const KConfigGroup config(KSharedConfig::openConfig(), "CertificateCreationWizard");
if (config.readEntry("SkipResultPage", false)) {
if (result.fingerprint()) {
KleopatraApplication::instance()->slotActivateRequested(QStringList() <<
QStringLiteral("kleopatra") << QStringLiteral("--query") << QLatin1String(result.fingerprint()), QString());
QMetaObject::invokeMethod(wizard(), "close", Qt::QueuedConnection);
} else {
QMetaObject::invokeMethod(wizard(), "next", Qt::QueuedConnection);
}
} else {
QMetaObject::invokeMethod(wizard(), "next", Qt::QueuedConnection);
}
} }
private: private:
......
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