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 }