summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-03-30 14:07:07 +0200
committerAndre Heinecke <[email protected]>2016-03-30 14:07:07 +0200
commitfa790c203e24309080a7e429b0a040fafee9b087 (patch)
tree0233a8bad6708773e7e7f30b949fa356d3c3324b
parent3ca47026c2979962c2d52063cffc2f127f694c82 (diff)
Port gnupgprocesscommand to QProcess
-rw-r--r--src/commands/gnupgprocesscommand.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/commands/gnupgprocesscommand.cpp b/src/commands/gnupgprocesscommand.cpp
index edcba5d..51c358a 100644
--- a/src/commands/gnupgprocesscommand.cpp
+++ b/src/commands/gnupgprocesscommand.cpp
@@ -39,7 +39,6 @@
#include <utils/kdlogtextwidget.h>
#include "kleopatra_debug.h"
-#include <KProcess>
#include <KLocalizedString>
#include <KWindowSystem>
@@ -52,6 +51,7 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QPointer>
+#include <QProcess>
static const int PROCESS_TERMINATE_TIMEOUT = 5000; // milliseconds
@@ -178,7 +178,7 @@ private:
void slotProcessReadyReadStandardError();
private:
- KProcess process;
+ QProcess process;
QPointer<OutputDialog> dialog;
QStringList arguments;
QByteArray errorBuffer;
@@ -208,8 +208,8 @@ GnuPGProcessCommand::Private::Private(GnuPGProcessCommand *qq, KeyListController
showsOutputWindow(false),
canceled(false)
{
- process.setOutputChannelMode(KProcess::OnlyStderrChannel);
- process.setReadChannel(KProcess::StandardError);
+ process.setProcessChannelMode(QProcess::ForwardedErrorChannel);
+ process.setReadChannel(QProcess::StandardError);
}
GnuPGProcessCommand::Private::~Private() {}
@@ -267,7 +267,8 @@ void GnuPGProcessCommand::doStart()
d->arguments = arguments();
- d->process << d->arguments;
+ d->process.setProgram(d->arguments.takeFirst());
+ d->process.setArguments(d->arguments);
d->process.start();