|
|
@ -378,11 +378,21 @@ bool ConnectionLoader::startEmbeddedHushd() { |
|
|
|
// Static because it needs to survive even after this method returns.
|
|
|
|
static QString processStdErrOutput; |
|
|
|
|
|
|
|
// Try to get only the error message
|
|
|
|
const QString friendlyError("Error:"); |
|
|
|
processStdErrOutput.left(processStdErrOutput.indexOf(friendlyError) + friendlyError.length()); |
|
|
|
|
|
|
|
if (ehushd != nullptr) { |
|
|
|
if (ehushd->state() == QProcess::NotRunning) { |
|
|
|
if (!processStdErrOutput.isEmpty()) { |
|
|
|
QMessageBox::critical(main, QObject::tr("hushd error"), "hushd said: " + processStdErrOutput, |
|
|
|
QMessageBox::Ok); |
|
|
|
// Static QMessageBox functions don't support detailed text property
|
|
|
|
//QMessageBox::critical(main, QObject::tr("hushd error"), "hushd said: " + friendlyError, QMessageBox::Ok);
|
|
|
|
|
|
|
|
QMessageBox msgBox; |
|
|
|
msgBox.setText(QObject::tr("hushd error")); |
|
|
|
msgBox.setInformativeText(friendlyError); |
|
|
|
msgBox.setDetailedText(processStdErrOutput); |
|
|
|
msgBox.exec(); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} else { |
|
|
|