VCS: De-slot

Change-Id: I805eb88dee7ec1243d59c32be23f2fb401f1f46e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-18 23:40:19 +02:00
committed by Orgad Shaneh
parent a18f405ba1
commit 6031892f96
4 changed files with 13 additions and 21 deletions

View File

@@ -993,17 +993,23 @@ PerforceResponse PerforcePlugin::synchronousProcess(const QString &workingDir,
// connect stderr to the output window if desired
if (flags & StdErrToWindow) {
process.setStdErrBufferedSignalsEnabled(true);
connect(&process, SIGNAL(stdErrBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
connect(&process, &SynchronousProcess::stdErrBuffered,
outputWindow, [outputWindow](const QString &lines) {
outputWindow->append(lines);
});
}
// connect stdout to the output window if desired
if (flags & StdOutToWindow) {
process.setStdOutBufferedSignalsEnabled(true);
if (flags & SilentStdOut) {
connect(&process, &SynchronousProcess::stdOutBuffered, outputWindow, &VcsOutputWindow::appendSilently);
}
else {
connect(&process, SIGNAL(stdOutBuffered(QString,bool)), outputWindow, SLOT(append(QString)));
connect(&process, &SynchronousProcess::stdOutBuffered,
outputWindow, &VcsOutputWindow::appendSilently);
} else {
connect(&process, &SynchronousProcess::stdOutBuffered,
outputWindow, [outputWindow](const QString &lines) {
outputWindow->append(lines);
});
}
}
process.setTimeOutMessageBoxEnabled(true);