QT 5.5 does not have this feature and it is version in Ubuntu 16.04

This commit is contained in:
Miodrag Milanovic 2018-07-17 14:29:16 +02:00
parent 7c89aed70e
commit c2fe09ec83

View File

@ -61,7 +61,11 @@ YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError())); connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError()));
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput())); connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
connect(process, &QProcess::started, this, [this] { lineEdit->setEnabled(true); }); connect(process, &QProcess::started, this, [this] { lineEdit->setEnabled(true); });
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
connect(process, &QProcess::error, this, [this](QProcess::ProcessError error) {
#else
connect(process, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) { connect(process, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
#endif
if (error == QProcess::FailedToStart) { if (error == QProcess::FailedToStart) {
QMessageBox::critical( QMessageBox::critical(
this, QString::fromUtf8("Yosys cannot be started!"), this, QString::fromUtf8("Yosys cannot be started!"),