Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ate/OpenROAD into grt_buffer_removal
  • Loading branch information
eder-matheus committed Aug 19, 2024
2 parents 01348db + 16b33c7 commit ee3d364
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/gui/src/drcWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ void DRCWidget::setLogger(utl::Logger* logger)

void DRCWidget::selectReport()
{
if (!block_) {
logger_->error(utl::GUI, 104, "No database has been loaded");
}

// OpenLane uses .drc and OpenROAD-flow-scripts uses .rpt
QString filename = QFileDialog::getOpenFileName(
this,
Expand Down Expand Up @@ -647,7 +651,7 @@ void DRCWidget::loadTRReport(const QString& filename)
std::string item_type = single_source.substr(0, ident);
std::string item_name = single_source.substr(ident + 1);

std::any item = nullptr;
std::any item;

if (item_type == "net") {
odb::dbNet* net = block_->findNet(item_name.c_str());
Expand Down
19 changes: 18 additions & 1 deletion src/gui/src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,23 @@ void Gui::init(odb::dbDatabase* db, utl::Logger* logger)
placement_density_heat_map_->registerHeatMap();
}

class SafeApplication : public QApplication
{
public:
using QApplication::QApplication;

bool notify(QObject* receiver, QEvent* event) override
{
try {
return QApplication::notify(receiver, event);
} catch (std::exception& ex) {
// Ignored here as the message will be logged in the GUI
}

return false;
}
};

//////////////////////////////////////////////////

// This is the main entry point to start the GUI. It only
Expand All @@ -1284,7 +1301,7 @@ int startGui(int& argc,
// ensure continue after close is false
gui->clearContinueAfterClose();

QApplication app(argc, argv);
SafeApplication app(argc, argv);
application = &app;

// Default to 12 point for easier reading
Expand Down

0 comments on commit ee3d364

Please sign in to comment.