diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp index 2ba5859b3..731305fee 100644 --- a/generators/comicbook/unrar.cpp +++ b/generators/comicbook/unrar.cpp @@ -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(&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(&KPtyProcess::finished), this, &Unrar::finished); +#endif #if defined(Q_OS_WIN) mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );