|
|
@ -378,11 +378,24 @@ bool ConnectionLoader::startEmbeddedHushd() { |
|
|
|
// Static because it needs to survive even after this method returns.
|
|
|
|
static QString processStdErrOutput; |
|
|
|
|
|
|
|
// Try to get only the error message
|
|
|
|
auto friendlyError = processStdErrOutput.split("Error: "); |
|
|
|
|
|
|
|
if (ehushd != nullptr) { |
|
|
|
if (ehushd->state() == QProcess::NotRunning) { |
|
|
|
if (!processStdErrOutput.isEmpty()) { |
|
|
|
QMessageBox::critical(main, QObject::tr("hushd error"), "hushd said: " + processStdErrOutput, |
|
|
|
QMessageBox::Ok); |
|
|
|
QMessageBox msgBox; |
|
|
|
msgBox.setIcon(QMessageBox::Critical); |
|
|
|
msgBox.setText(friendlyError.last()); |
|
|
|
msgBox.setDetailedText(processStdErrOutput); |
|
|
|
|
|
|
|
//Add styles and width hack
|
|
|
|
msgBox.setStyleSheet("background-color:rgb(48, 51, 53);color:rgb(255, 255, 255)"); |
|
|
|
QSpacerItem* horizontalSpacer = new QSpacerItem(512, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); |
|
|
|
QGridLayout* layout = (QGridLayout*)msgBox.layout(); |
|
|
|
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount()); |
|
|
|
|
|
|
|
msgBox.exec(); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} else { |
|
|
|