mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Merge pull request #308 from plc-user/master
use MessageBox to inform user about additional info when importing scaled element
This commit is contained in:
@@ -21,7 +21,9 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief QET_ElementScaler
|
* @brief QET_ElementScaler
|
||||||
@@ -90,8 +92,17 @@ QByteArray ElementScaler(const QString &file_path, QWidget *parent)
|
|||||||
|
|
||||||
if (process_.waitForFinished())
|
if (process_.waitForFinished())
|
||||||
{
|
{
|
||||||
const auto byte_array{process_.readAll()};
|
const auto byte_array{process_.readAllStandardOutput()};
|
||||||
|
const auto error_output{process_.readAllStandardError()};
|
||||||
process_.close();
|
process_.close();
|
||||||
|
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.setDetailedText(error_output);
|
||||||
|
msgBox.exec();
|
||||||
|
}
|
||||||
return byte_array;
|
return byte_array;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user