Commit dee5b8b0 authored by Hannah von Reth's avatar Hannah von Reth
Browse files

fix connect on windows

parent 71dd0754
......@@ -220,16 +220,19 @@ int Unrar::startSyncProcess( const QStringList &args )
int ret = 0;
#if defined(Q_OS_WIN)
mProcess = new QProcess( this );
mProcess = new QProcess( this );
connect(mProcess, &QProcess::readyReadStandardOutput, this, &Unrar::readFromStdout);
connect(mProcess, &QProcess::readyReadStandardError, this, &Unrar::readFromStderr);
connect(mProcess, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this, &Unrar::finished);
#else
mProcess = new KPtyProcess( this );
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
#endif
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
connect(mProcess, &KPtyProcess::readyReadStandardOutput, this, &Unrar::readFromStdout);
connect(mProcess, &KPtyProcess::readyReadStandardError, this, &Unrar::readFromStderr);
connect(mProcess, static_cast<void (KPtyProcess::*)(int, QProcess::ExitStatus)>(&KPtyProcess::finished), this, &Unrar::finished);
#endif
#if defined(Q_OS_WIN)
mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
......
Supports Markdown
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