Skip to content

Commit

Permalink
dxftoelmt: add Print standard error and filepath to the log file
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpio810 committed Sep 29, 2024
1 parent f0b0af9 commit fcd2f68
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sources/dxf/dxftoelmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <QProcess>
#include <QMessageBox>
#include <QDir>
#include <iostream>
#include <QDebug>

/**
* @brief dxftoElmt
Expand All @@ -43,12 +45,15 @@ QByteArray dxfToElmt(const QString &file_path)
const QStringList arguments{file_path, QStringLiteral("-v")};

process_.start(program, arguments);

if (process_.waitForFinished())
{
const auto byte_array{process_.readAll()};
process_.close();
return byte_array;
qInfo()<<"\n Start converting DXF file..........\n"<< file_path;
qInfo()<< process_.readAllStandardError(); //Print standard error to log file

const auto byte_array{process_.readAll()};
process_.close();
return byte_array;
}
else
{
Expand Down

0 comments on commit fcd2f68

Please sign in to comment.