mirror of https://github.com/YosysHQ/nextpnr.git
gui: Fix crash when pass throws error
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
211cb5703c
commit
ebd364bfee
|
|
@ -147,12 +147,14 @@ Application::Application(int &argc, char **argv, bool noantialiasing) : QApplica
|
|||
std::set_terminate(do_error);
|
||||
}
|
||||
|
||||
void Application::show_pass_error() { QMessageBox::critical(0, "Error", "Pass failed, see log for details!"); }
|
||||
|
||||
bool Application::notify(QObject *receiver, QEvent *event)
|
||||
{
|
||||
try {
|
||||
return QApplication::notify(receiver, event);
|
||||
} catch (log_execution_error_exception) {
|
||||
QMessageBox::critical(0, "Error", "Pass failed, see log for details!");
|
||||
QMetaObject::invokeMethod(this, &Application::show_pass_error, Qt::QueuedConnection);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class Application : public QApplication
|
|||
public:
|
||||
Application(int &argc, char **argv, bool noantialiasing);
|
||||
bool notify(QObject *receiver, QEvent *event);
|
||||
protected Q_SLOTS:
|
||||
void show_pass_error();
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
|
|
|||
Loading…
Reference in New Issue