fix connect on windows

This commit is contained in:
Patrick von Reth 2015-01-23 13:23:12 +01:00
parent 71dd075437
commit dee5b8b006

View file

@ -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 );