mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 17:10:44 +08:00
Rename the Seer and Gdb log widgets.
Direct all '=' from the gdb log to the seer log.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#include "SeerSeerLogWidget.h"
|
||||
#include "SeerUtl.h"
|
||||
#include <QtWidgets/QScrollBar>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
SeerSeerLogWidget::SeerSeerLogWidget (QWidget* parent) : SeerLogWidget(parent) {
|
||||
}
|
||||
|
||||
SeerSeerLogWidget::~SeerSeerLogWidget () {
|
||||
}
|
||||
|
||||
void SeerSeerLogWidget::processText (const QString& text) {
|
||||
|
||||
// Don't do anything if we're not enabled.
|
||||
if (isLogEnabled() == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only log '^', '*', and '=' records.
|
||||
bool selected = false;
|
||||
|
||||
if (selected == false && text.front() == '^') {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false && text.front() == '*') {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false && text.front() == '=') {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false && text.contains(QRegExp("^([0-9]+)\\^")) == true) {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false && text.contains(QRegExp("^([0-9]+)\\*")) == true) {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false && text.contains(QRegExp("^([0-9]+)\\=")) == true) {
|
||||
selected = true;
|
||||
}
|
||||
|
||||
if (selected == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Filter escape characters.
|
||||
QString str = Seer::filterEscapes(text);
|
||||
|
||||
// Write the string to the log.
|
||||
textEdit->append(str);
|
||||
|
||||
moveToEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user