Skip to content
Snippets Groups Projects
Commit 98a62cc6 authored by Marco Biasini's avatar Marco Biasini
Browse files

log sys.stderr to message widget

parent f232e60c
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,10 @@ MessageWidget::MessageWidget(QWidget* parent) :
+ QString("delete_icon.png")));
connect(clear_action, SIGNAL(triggered(bool)), this, SLOT(Clear()));
this->actions_.append(clear_action);
QObject::connect(&PythonInterpreter::Instance(),
SIGNAL(ErrorOutput(unsigned int, const QString &)),
this,
SLOT(ErrorOutput(unsigned int, const QString &)));
new LogReader(this);
}
......@@ -95,6 +98,11 @@ void MessageWidget::LogMessage(const QString& message, QMessageBox::Icon icon) {
this->Increase(icon);
}
void MessageWidget::ErrorOutput(unsigned int id,const QString& output)
{
this->LogMessage(output, QMessageBox::Critical);
}
void MessageWidget::LogMessage(QStandardItem* item) {
item->setData(QVariant(QMessageBox::NoIcon));
this->model_->appendRow(item);
......
......@@ -60,6 +60,7 @@ signals:
void AllCleared();
public slots:
void ErrorOutput(unsigned int id,const QString& output);
void Clear();
void RemoveSelected();
void Update();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment