aboutsummaryrefslogtreecommitdiffstats
path: root/gui/yosystab.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-17 11:00:54 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-17 11:00:54 +0200
commitb55142cbf15ea8098f7d0bfa4b34a18540cc4fb2 (patch)
tree87c8428570d913aaae936c1fc462d2d146b90c0f /gui/yosystab.cc
parent924037129c711cba718927a6a8b1f17cc101f7c1 (diff)
parenta5f93343b622a43509f8a99a71ba37801d104ea7 (diff)
downloadnextpnr-b55142cbf15ea8098f7d0bfa4b34a18540cc4fb2.tar.gz
nextpnr-b55142cbf15ea8098f7d0bfa4b34a18540cc4fb2.tar.bz2
nextpnr-b55142cbf15ea8098f7d0bfa4b34a18540cc4fb2.zip
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
Diffstat (limited to 'gui/yosystab.cc')
-rw-r--r--gui/yosystab.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/yosystab.cc b/gui/yosystab.cc
index 1661c74f..f2e99cbc 100644
--- a/gui/yosystab.cc
+++ b/gui/yosystab.cc
@@ -19,6 +19,7 @@
#include "yosystab.h"
#include <QGridLayout>
+#include <QMessageBox>
NEXTPNR_NAMESPACE_BEGIN
@@ -47,6 +48,7 @@ YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
lineEdit->setMaximumHeight(30);
lineEdit->setFont(f);
lineEdit->setFocus();
+ lineEdit->setEnabled(false);
lineEdit->setPlaceholderText("yosys>");
connect(lineEdit, SIGNAL(textLineInserted(QString)), this, SLOT(editLineReturnPressed(QString)));
@@ -58,6 +60,15 @@ YosysTab::YosysTab(QString folder, QWidget *parent) : QWidget(parent)
process = new QProcess();
connect(process, SIGNAL(readyReadStandardError()), this, SLOT(onReadyReadStandardError()));
connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onReadyReadStandardOutput()));
+ connect(process, &QProcess::started, this, [this] { lineEdit->setEnabled(true); });
+ connect(process, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
+ if (error == QProcess::FailedToStart) {
+ QMessageBox::critical(
+ this, QString::fromUtf8("Yosys cannot be started!"),
+ QString::fromUtf8("<p>Please make sure you have Yosys installed and available in path</p>"));
+ Q_EMIT deleteLater();
+ }
+ });
process->setWorkingDirectory(folder);
process->start("yosys");
}