From f827e693ef98c0fefd80cfaf15c9560ae739d4fe Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 9 May 2022 00:29:48 +0200 Subject: [PATCH] Fixed Qt-less build --- src/edt/edt/edtMainService.cc | 5 ++++- src/laybasic/laybasic/layEditorServiceBase.cc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/edt/edt/edtMainService.cc b/src/edt/edt/edtMainService.cc index 0e54aa364..73957aebd 100644 --- a/src/edt/edt/edtMainService.cc +++ b/src/edt/edt/edtMainService.cc @@ -1331,7 +1331,10 @@ MainService::cm_convert_to_pcell () } if (any_non_converted) { - QMessageBox::warning (view ()->widget (), tr ("Warning"), tr ("Some of the shapes could not be converted to the desired PCell")); + tl::warn << tl::to_string (tr ("Some of the shapes could not be converted to the desired PCell")); +#if defined(HAVE_QT) + QMessageBox::warning (view (), tr ("Warning"), tr ("Some of the shapes could not be converted to the desired PCell")); +#endif } manager ()->commit (); diff --git a/src/laybasic/laybasic/layEditorServiceBase.cc b/src/laybasic/laybasic/layEditorServiceBase.cc index 74a751b8b..55b9c44f2 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.cc +++ b/src/laybasic/laybasic/layEditorServiceBase.cc @@ -307,7 +307,7 @@ EditorServiceBase::show_error (tl::Exception &ex) { tl::error << ex.msg (); #if defined(HAVE_QT) - QMessageBox::critical (0, tr ("Error"), tl::to_qstring (ex.msg ())); + QMessageBox::critical (widget (), tr ("Error"), tl::to_qstring (ex.msg ())); #endif }