mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-13 13:11:41 +00:00
fix connect on windows
This commit is contained in:
parent
71dd075437
commit
dee5b8b006
|
@ -220,16 +220,19 @@ int Unrar::startSyncProcess( const QStringList &args )
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#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
|
#else
|
||||||
mProcess = new KPtyProcess( this );
|
mProcess = new KPtyProcess( this );
|
||||||
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
|
mProcess->setOutputChannelMode( KProcess::SeparateChannels );
|
||||||
#endif
|
|
||||||
|
|
||||||
connect(mProcess, &KPtyProcess::readyReadStandardOutput, this, &Unrar::readFromStdout);
|
connect(mProcess, &KPtyProcess::readyReadStandardOutput, this, &Unrar::readFromStdout);
|
||||||
connect(mProcess, &KPtyProcess::readyReadStandardError, this, &Unrar::readFromStderr);
|
connect(mProcess, &KPtyProcess::readyReadStandardError, this, &Unrar::readFromStderr);
|
||||||
connect(mProcess, static_cast<void (KPtyProcess::*)(int, QProcess::ExitStatus)>(&KPtyProcess::finished), this, &Unrar::finished);
|
connect(mProcess, static_cast<void (KPtyProcess::*)(int, QProcess::ExitStatus)>(&KPtyProcess::finished), this, &Unrar::finished);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
|
mProcess->start( helper->unrarPath, args, QIODevice::ReadWrite | QIODevice::Unbuffered );
|
||||||
|
|
Loading…
Reference in a new issue