Mercurial > hg > easyhg
diff hgrunner.cpp @ 76:d575a8f76a53
* Win32 build fixes
author | Chris Cannam |
---|---|
date | Sat, 20 Nov 2010 10:11:00 +0000 |
parents | 295e3ee4a257 |
children | b522aaa2c053 |
line wrap: on
line diff
--- a/hgrunner.cpp Fri Nov 19 18:39:40 2010 +0000 +++ b/hgrunner.cpp Sat Nov 20 10:11:00 2010 +0000 @@ -29,10 +29,13 @@ #include <iostream> #include <unistd.h> -#include <pty.h> #include <errno.h> #include <stdio.h> +#ifndef Q_OS_WIN32 +#include <pty.h> +#endif + HgRunner::HgRunner(QWidget * parent): QProgressBar(parent) { proc = new QProcess(this); @@ -50,6 +53,7 @@ stdErr.clear(); procInput = 0; +#ifndef Q_OS_WIN32 char name[1024]; if (openpty(&ptyMasterFd, &ptySlaveFd, name, NULL, NULL)) { perror("openpty failed"); @@ -62,7 +66,7 @@ proc->setStandardInputFile(ptySlaveFilename); ::close(ptySlaveFd); } - +#endif connect(proc, SIGNAL(started()), this, SLOT(started())); connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finished(int, QProcess::ExitStatus)));