diff --git a/sources/dxf/dxftoelmt.cpp b/sources/dxf/dxftoelmt.cpp index c326534c7..895690587 100644 --- a/sources/dxf/dxftoelmt.cpp +++ b/sources/dxf/dxftoelmt.cpp @@ -22,7 +22,6 @@ #include #include #include -#include /** * @brief dxftoElmt @@ -44,23 +43,22 @@ QByteArray dxfToElmt(const QString &file_path) const QStringList arguments{file_path, QStringLiteral("-v")}; process_.start(program, arguments); - // qInfo()<<"\n Start converting DXF file..........\n"<< file_path; - //qInfo()<< process_.readAllStandardError().data(); //Print standard error to log file + if (process_.waitForFinished()) { - bool dxf2elmterr = process_.readAllStandardError().isEmpty(); - QString message=QObject::tr( - "Error: Make sure the file is a valid .dxf file"); + const auto byte_array{process_.readAllStandardOutput()}; + const auto error_output{process_.readAllStandardError()}; - if (!dxf2elmterr){ - QMessageBox::warning(nullptr, - QObject::tr("Error: to convert this dxf file."), - message); - } - - const auto byte_array{process_.readAll()}; process_.close(); + if (error_output.length() > 0) { + // inform the user about log-output via QMessageBox + QMessageBox msgBox; + msgBox.setText(QObject::tr ("Dxf2elmt: \nError: Make sure the file is a valid .dxf file")); + msgBox.setInformativeText (QObject::tr("See details here:")); + msgBox.setDetailedText(error_output); + msgBox.exec(); + } return byte_array; } else diff --git a/sources/qet_elementscaler/qet_elementscaler.cpp b/sources/qet_elementscaler/qet_elementscaler.cpp index 5e5921f38..ab61a684b 100644 --- a/sources/qet_elementscaler/qet_elementscaler.cpp +++ b/sources/qet_elementscaler/qet_elementscaler.cpp @@ -97,8 +97,8 @@ QByteArray ElementScaler(const QString &file_path, QWidget *parent) if (error_output.length() > 0) { // inform the user about log-output via QMessageBox QMessageBox msgBox; - msgBox.setText("QET_ElementScaler: \nadditional information about import / scaling"); - msgBox.setInformativeText("See details here:"); + msgBox.setText (QObject::tr("QET_ElementScaler: \nadditional information about import / scaling")); + msgBox.setInformativeText(QObject::tr("See details here:")); msgBox.setDetailedText(error_output); msgBox.exec(); }