Call waitForStarted() before each waitForFinished().

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-03 10:40:23 +02:00
parent df758fd159
commit fa67634f38
2 changed files with 5 additions and 2 deletions

View file

@ -292,7 +292,7 @@ bool DialogSaveLayout::TestPdf()
#else
proc.start(PDFTOPS); // Seek pdftops in standard path
#endif
if (proc.waitForFinished(15000) || proc.state() == QProcess::NotRunning)
if (proc.waitForStarted(15000) && (proc.waitForFinished(15000) || proc.state() == QProcess::NotRunning))
{
res = true;
}

View file

@ -740,7 +740,10 @@ void MainWindowsNoGUI::PdfToPs(const QStringList &params) const
#endif
QProcess proc;
proc.start(PDFTOPS, params);
proc.waitForFinished(15000);
if (proc.waitForStarted(15000))
{
proc.waitForFinished(15000);
}
#ifndef QT_NO_CURSOR
QApplication::restoreOverrideCursor();
#endif