summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick von Reth <vonreth@kde.org>2015-01-23 12:23:12 (GMT)
committerPatrick von Reth <vonreth@kde.org>2015-01-23 12:23:12 (GMT)
commitdee5b8b00634c9293b292c959ecb83b3e448f40e (patch)
tree3f4f6aa986661e2311a591f5fd2b8fea7c97c820
parent71dd075437a4ddb6fa60e23ee6806fd9501e9d0b (diff)
fix connect on windows
-rw-r--r--generators/comicbook/unrar.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/generators/comicbook/unrar.cpp b/generators/comicbook/unrar.cpp
index 2ba5859..731305f 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<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 );