From 751211351ce75c009d48fb57b3c432571e1ab929 Mon Sep 17 00:00:00 2001
From: scrawl
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;