diff --git a/components/process/processinvoker.cpp b/components/process/processinvoker.cpp index 44a11cc4e..4d53084c6 100644 --- a/components/process/processinvoker.cpp +++ b/components/process/processinvoker.cpp @@ -111,37 +111,39 @@ bool Process::ProcessInvoker::startProcess(const QString &name, const QStringLis } else { mProcess->start(path, arguments); -// if (!mProcess->waitForFinished()) { -// QMessageBox msgBox; -// msgBox.setWindowTitle(tr("Error starting executable")); -// msgBox.setIcon(QMessageBox::Critical); -// msgBox.setStandardButtons(QMessageBox::Ok); -// msgBox.setText(tr("
Could not start %1
\ -//An error occurred while starting %1.
\ -//Press \"Show Details...\" for more information.
").arg(info.fileName())); -// msgBox.setDetailedText(mProcess->errorString()); -// msgBox.exec(); - -// return false; -// } - -// if (mProcess->exitCode() != 0 || mProcess->exitStatus() == QProcess::CrashExit) { -// QString error(mProcess->readAllStandardError()); -// error.append(tr("\nArguments:\n")); -// error.append(arguments.join(" ")); - -// QMessageBox msgBox; -// msgBox.setWindowTitle(tr("Error running executable")); -// msgBox.setIcon(QMessageBox::Critical); -// msgBox.setStandardButtons(QMessageBox::Ok); -// msgBox.setText(tr("Executable %1 returned an error
\ -//An error occurred while running %1.
\ -//Press \"Show Details...\" for more information.
").arg(info.fileName())); -// msgBox.setDetailedText(error); -// msgBox.exec(); - -// return false; -// } + /* + if (!mProcess->waitForFinished()) { + QMessageBox msgBox; + msgBox.setWindowTitle(tr("Error starting executable")); + msgBox.setIcon(QMessageBox::Critical); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setText(tr("Could not start %1
\ +An error occurred while starting %1.
\ +Press \"Show Details...\" for more information.
").arg(info.fileName())); + msgBox.setDetailedText(mProcess->errorString()); + msgBox.exec(); + + return false; + } + + if (mProcess->exitCode() != 0 || mProcess->exitStatus() == QProcess::CrashExit) { + QString error(mProcess->readAllStandardError()); + error.append(tr("\nArguments:\n")); + error.append(arguments.join(" ")); + + QMessageBox msgBox; + msgBox.setWindowTitle(tr("Error running executable")); + msgBox.setIcon(QMessageBox::Critical); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setText(tr("Executable %1 returned an error
\ +An error occurred while running %1.
\ +Press \"Show Details...\" for more information.
").arg(info.fileName())); + msgBox.setDetailedText(error); + msgBox.exec(); + + return false; + } + */ } return true;