Do not inhibit QProcess::close anymore

This seemed more like a debug patch. We want that an input
is closed e.g. on Cancel so that a long running process
is killed correctly. This is especially important
when tar'ing.
parent 85fd127a
......@@ -64,20 +64,6 @@ using namespace Kleo;
namespace
{
class Process : public QProcess
{
public:
explicit Process(QObject *parent = nullptr)
: QProcess(parent) {}
void close() override {
closeReadChannel(StandardOutput);
}
};
}
namespace
{
class PipeInput : public InputImplBase
{
public:
......@@ -123,7 +109,7 @@ private:
private:
const QString m_command;
const QStringList m_arguments;
const std::shared_ptr<Process> m_proc;
const std::shared_ptr<QProcess> m_proc;
};
class FileInput : public InputImplBase
......@@ -348,7 +334,7 @@ ProcessStdOutInput::ProcessStdOutInput(const QString &cmd, const QStringList &ar
: InputImplBase(),
m_command(cmd),
m_arguments(args),
m_proc(new Process)
m_proc(new QProcess)
{
const QIODevice::OpenMode openMode =
stdin_.isEmpty() ? QIODevice::ReadOnly : QIODevice::ReadWrite;
......
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