diff --git a/src/GdbMonitor.cpp b/src/GdbMonitor.cpp index 774a0ea..b93841b 100644 --- a/src/GdbMonitor.cpp +++ b/src/GdbMonitor.cpp @@ -15,7 +15,7 @@ void GdbMonitor::handleErrorOccurred (QProcess::ProcessError error) { Q_UNUSED(error); - //qDebug() << __PRETTY_FUNCTION__ << ":" << error; + //qDebug() << error; qApp->exit(); } @@ -25,14 +25,14 @@ void GdbMonitor::handleFinished (int exitCode, QProcess::ExitStatus exitStatus) Q_UNUSED(exitCode); Q_UNUSED(exitStatus); - //qDebug() << __PRETTY_FUNCTION__ << ":" << exitCode << exitStatus; + //qDebug() << exitCode << exitStatus; qApp->exit(); } void GdbMonitor::handleReadyReadStandardError () { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Ready to read stderr"; + //qDebug() << "Ready to read stderr"; QProcess* p = (QProcess*)sender(); @@ -56,7 +56,7 @@ void GdbMonitor::handleReadyReadStandardError () { void GdbMonitor::handleReadyReadStandardOutput () { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Ready to read stdout"; + //qDebug() << "Ready to read stdout"; QProcess* p = (QProcess*)sender(); @@ -73,7 +73,7 @@ void GdbMonitor::handleReadyReadStandardOutput () { // Convert to a string. QString text(buf); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Read buffer" << buf.size() << (int)buf[buf.size()-1] << text; + //qDebug() << "Read buffer" << buf.size() << (int)buf[buf.size()-1] << text; // Start broadcasting it around. emit allTextOutput(text); @@ -103,12 +103,12 @@ void GdbMonitor::handleReadyReadStandardOutput () { } } - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Finished reading stdout"; + //qDebug() << "Finished reading stdout"; } void GdbMonitor::handleTextOutput (QString text) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Ready to handle text output"; + //qDebug() << "Ready to handle text output"; emit allTextOutput(text); @@ -136,19 +136,19 @@ void GdbMonitor::handleTextOutput (QString text) { emit textOutput(text); } - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Finished handling text output"; + //qDebug() << "Finished handling text output"; } void GdbMonitor::handleStarted() { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); } void GdbMonitor::handleStateChanged(QProcess::ProcessState newState) { Q_UNUSED(newState); - //qDebug() << __PRETTY_FUNCTION__ << ":" << newState; + //qDebug() << newState; } void GdbMonitor::setProcess (QProcess* process) { diff --git a/src/QProcessInfo.cpp b/src/QProcessInfo.cpp index c05c632..c5f68d0 100644 --- a/src/QProcessInfo.cpp +++ b/src/QProcessInfo.cpp @@ -81,9 +81,9 @@ QProcessList QProcessInfo::populate() { QString line = in.readLine(); if (line.startsWith(QStringLiteral("Uid:"))) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << line; - //qDebug() << __PRETTY_FUNCTION__ << ":" << line.split(QRegExp("\\s+")).at(0); - //qDebug() << __PRETTY_FUNCTION__ << ":" << line.split(QRegExp("\\s+")).at(1); + //qDebug() << line; + //qDebug() << line.split(QRegExp("\\s+")).at(0); + //qDebug() << line.split(QRegExp("\\s+")).at(1); //qDebug() << ""; info.setUsername(line.split(QRegExp("\\s+")).at(1)); break; diff --git a/src/SeerArrayVisualizerWidget.cpp b/src/SeerArrayVisualizerWidget.cpp index 6a6e523..fd98650 100644 --- a/src/SeerArrayVisualizerWidget.cpp +++ b/src/SeerArrayVisualizerWidget.cpp @@ -89,7 +89,7 @@ void SeerArrayVisualizerWidget::setVariableAddress (const QString& address) { offset = 0; } - //qDebug() << __PRETTY_FUNCTION__ << ":" << address << offset << ok; + //qDebug() << address << offset << ok; memoryHexEditor->setAddressOffset(offset); } @@ -100,7 +100,7 @@ QString SeerArrayVisualizerWidget::variableAddress () const { void SeerArrayVisualizerWidget::handleText (const QString& text) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { @@ -125,7 +125,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { if (id_text.toInt() == _memoryId) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QString memory_text = Seer::parseFirst(text, "memory=", '[', ']', false); @@ -136,7 +136,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { QString contents_text = Seer::parseFirst(range_text, "contents=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << contents_text; + //qDebug() << contents_text; // Convert hex string to byte array. QByteArray array; @@ -291,7 +291,7 @@ void SeerArrayVisualizerWidget::writeSettings() { settings.setValue("size", size()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerArrayVisualizerWidget::readSettings() { @@ -302,7 +302,7 @@ void SeerArrayVisualizerWidget::readSettings() { resize(settings.value("size", QSize(800, 400)).toSize()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerArrayVisualizerWidget::resizeEvent (QResizeEvent* event) { diff --git a/src/SeerBreakpointsBrowserWidget.cpp b/src/SeerBreakpointsBrowserWidget.cpp index e5f27f0..6cca53b 100644 --- a/src/SeerBreakpointsBrowserWidget.cpp +++ b/src/SeerBreakpointsBrowserWidget.cpp @@ -67,7 +67,7 @@ QStringList SeerBreakpointsBrowserWidget::breakpointsText () const { breakpointList.append(breakpointParameters); - //qDebug() << __PRETTY_FUNCTION__ << ":" << breakpointParameters; + //qDebug() << breakpointParameters; ++it; } @@ -123,7 +123,7 @@ void SeerBreakpointsBrowserWidget::handleText (const QString& text) { QString body_text = Seer::parseFirst(newtext, "body=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << body_text; + //qDebug() << body_text; if (body_text != "") { diff --git a/src/SeerCatchpointCreateDialog.cpp b/src/SeerCatchpointCreateDialog.cpp index b378a2b..200a20e 100644 --- a/src/SeerCatchpointCreateDialog.cpp +++ b/src/SeerCatchpointCreateDialog.cpp @@ -96,7 +96,7 @@ QString SeerCatchpointCreateDialog::catchpointText () const { } } - //qDebug() << __PRETTY_FUNCTION__ << ":" << catchpointParameters; + //qDebug() << catchpointParameters; return catchpointParameters; } diff --git a/src/SeerCatchpointsBrowserWidget.cpp b/src/SeerCatchpointsBrowserWidget.cpp index 0d9b013..0568850 100644 --- a/src/SeerCatchpointsBrowserWidget.cpp +++ b/src/SeerCatchpointsBrowserWidget.cpp @@ -68,7 +68,7 @@ QStringList SeerCatchpointsBrowserWidget::catchpointsText () const { catchpointList.append(catchpointParameters); - //qDebug() << __PRETTY_FUNCTION__ << ":" << catchpointParameters; + //qDebug() << catchpointParameters; ++it; } @@ -83,7 +83,7 @@ void SeerCatchpointsBrowserWidget::handleText (const QString& text) { return; } - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QApplication::setOverrideCursor(Qt::BusyCursor); @@ -119,7 +119,7 @@ void SeerCatchpointsBrowserWidget::handleText (const QString& text) { QString body_text = Seer::parseFirst(newtext, "body=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << body_text; + //qDebug() << body_text; // No rows? Just clear the tree. if (body_text == "") { diff --git a/src/SeerConfigDialog.cpp b/src/SeerConfigDialog.cpp index c91fc3d..909f901 100644 --- a/src/SeerConfigDialog.cpp +++ b/src/SeerConfigDialog.cpp @@ -167,7 +167,7 @@ bool SeerConfigDialog::seerClearManualCommandHistory () const { void SeerConfigDialog::handleChangePage(QListWidgetItem* current, QListWidgetItem* previous) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << current << previous; + //qDebug() << current << previous; if (!current) { current = previous; diff --git a/src/SeerConsoleWidget.cpp b/src/SeerConsoleWidget.cpp index f27415d..6fff2a0 100644 --- a/src/SeerConsoleWidget.cpp +++ b/src/SeerConsoleWidget.cpp @@ -241,18 +241,18 @@ void SeerConsoleWidget::createConsole () { _ptsFD = posix_openpt(O_RDWR | O_NOCTTY); if (_ptsFD < 0) { - qDebug() << __PRETTY_FUNCTION__ << "Failed to create tty" << strerror(errno); + qDebug() << "Failed to create tty" << strerror(errno); return; } if (grantpt(_ptsFD)) { - qDebug() << __PRETTY_FUNCTION__ << "Failed to grant pt" << strerror(errno); + qDebug() << "Failed to grant pt" << strerror(errno); ::close(_ptsFD); _ptsFD = -1; return; } if (unlockpt(_ptsFD)) { - qDebug() << __PRETTY_FUNCTION__ << "Failed to unlock pt" << strerror(errno); + qDebug() << "Failed to unlock pt" << strerror(errno); ::close(_ptsFD); _ptsFD = -1; return; } @@ -269,13 +269,13 @@ void SeerConsoleWidget::createConsole () { term_winsize.ws_ypixel = 20 * 8; if (ioctl(_ptsFD, TIOCSWINSZ, &term_winsize) < 0) { - qDebug() << __PRETTY_FUNCTION__ << "ioctl TIOCSWINSZ failed" << strerror(errno); + qDebug() << "ioctl TIOCSWINSZ failed" << strerror(errno); } // Set controlling if (ioctl(_ptsFD, TIOCSCTTY, (char *)0) < 0) { // Seems to work even though this fails. - // qDebug() << __PRETTY_FUNCTION__ << "ioctl TIOCSCTTY failed" << strerror(errno); + // qDebug() << "ioctl TIOCSCTTY failed" << strerror(errno); } // Save the device name. @@ -322,7 +322,7 @@ void SeerConsoleWidget::writeSettings() { settings.setValue("size", size()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerConsoleWidget::readSettings() { @@ -333,7 +333,7 @@ void SeerConsoleWidget::readSettings() { resize(settings.value("size", QSize(800, 600)).toSize()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerConsoleWidget::resizeEvent (QResizeEvent* event) { diff --git a/src/SeerDebugDialog.cpp b/src/SeerDebugDialog.cpp index 365d360..ccd8f0e 100644 --- a/src/SeerDebugDialog.cpp +++ b/src/SeerDebugDialog.cpp @@ -139,7 +139,7 @@ void SeerDebugDialog::setLaunchMode (const QString& mode) { setBreakInMain(true); }else{ - qDebug() << __PRETTY_FUNCTION__ << ":" << "Unknown launch mode of:" << mode; + qDebug() << "Unknown launch mode of:" << mode; } } diff --git a/src/SeerEditorManagerWidget.cpp b/src/SeerEditorManagerWidget.cpp index 8918d02..a48cb50 100644 --- a/src/SeerEditorManagerWidget.cpp +++ b/src/SeerEditorManagerWidget.cpp @@ -41,13 +41,13 @@ SeerEditorManagerWidget::~SeerEditorManagerWidget () { void SeerEditorManagerWidget::dumpEntries () const { - qDebug() << __PRETTY_FUNCTION__ << ":"; + qDebug(); SeerEditorManagerEntries::const_iterator b = beginEntry(); SeerEditorManagerEntries::const_iterator e = endEntry(); while (b != e) { - qDebug() << __PRETTY_FUNCTION__ << ":" << "\tFullname:" << b->fullname << "File:" << b->file; + qDebug() << "\tFullname:" << b->fullname << "File:" << b->file; b++; } } @@ -158,7 +158,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { if (text.startsWith("*stopped,")) { - //qDebug() << __PRETTY_FUNCTION__ << ":stopped:" << text; + //qDebug() << ":stopped:" << text; QString newtext = Seer::filterEscapes(text); // Filter escaped characters. @@ -172,8 +172,8 @@ void SeerEditorManagerWidget::handleText (const QString& text) { QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; + //qDebug() << frame_text; + //qDebug() << fullname_text << file_text << line_text; // If there is no file to open, just exit. if (fullname_text == "" || file_text == "") { @@ -233,7 +233,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { QString body_text = Seer::parseFirst(newtext, "body=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << body_text; + //qDebug() << body_text; if (body_text != "") { @@ -264,7 +264,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { }else if (text.startsWith("^done,stack=[") && text.endsWith("]")) { - //qDebug() << __PRETTY_FUNCTION__ << ":stack:" << text; + //qDebug() << ":stack:" << text; // // See SeerStackFramesBrowserWidget.cpp @@ -306,7 +306,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { SeerEditorManagerEntries::iterator e = endEntry(); if (i != e) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << line_text; + //qDebug() << fullname_text << line_text; i->widget->sourceArea()->addCurrentLine(line_text.toInt()); } } @@ -314,7 +314,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { }else if (text.startsWith("^error,msg=\"No registers.\"")) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // Clear current lines in all opened editor widgets. SeerEditorManagerEntries::iterator b = beginEntry(); @@ -355,7 +355,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { void SeerEditorManagerWidget::handleTabCloseRequested (int index) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << index << tabWidget->count() << tabWidget->tabText(0); + //qDebug() << index << tabWidget->count() << tabWidget->tabText(0); // If it is the place holder, don't delete it. if (tabWidget->tabText(index) == "") { @@ -425,7 +425,7 @@ SeerEditorWidget* SeerEditorManagerWidget::editorWidgetTab (const QString& fulln SeerEditorWidget* SeerEditorManagerWidget::createEditorWidgetTab (const QString& fullname, const QString& file, const QString& text) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname << file << text << tabWidget->count() << tabWidget->tabText(0); + //qDebug() << fullname << file << text << tabWidget->count() << tabWidget->tabText(0); // Remove the place holder tab, if present. if (tabWidget->count() == 1 && tabWidget->tabText(0) == "") { @@ -465,7 +465,7 @@ SeerEditorWidget* SeerEditorManagerWidget::createEditorWidgetTab (const QString& SeerEditorWidget* SeerEditorManagerWidget::createEditorWidgetTab (const QString& fullname, const QString& file) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname << file << tabWidget->count() << tabWidget->tabText(0); + //qDebug() << fullname << file << tabWidget->count() << tabWidget->tabText(0); // Remove the place holder tab, if present. if (tabWidget->count() == 1 && tabWidget->tabText(0) == "") { @@ -505,7 +505,7 @@ SeerEditorWidget* SeerEditorManagerWidget::createEditorWidgetTab (const QString& void SeerEditorManagerWidget::deleteEditorWidgetTab (int index) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << index << tabWidget->count() << tabWidget->tabText(index); + //qDebug() << index << tabWidget->count() << tabWidget->tabText(index); // Get the editor widget. SeerEditorWidget* editorWidget = static_cast(tabWidget->widget(index)); @@ -560,7 +560,7 @@ void SeerEditorManagerWidget::handleTextSearchToolButtonClicked () { void SeerEditorManagerWidget::handleInsertBreakpoint (QString breakpoint) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << breakpoint; + //qDebug() << breakpoint; // rethrow emit insertBreakpoint (breakpoint); @@ -568,7 +568,7 @@ void SeerEditorManagerWidget::handleInsertBreakpoint (QString breakpoint) { void SeerEditorManagerWidget::handleDeleteBreakpoints (QString breakpoints) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << breakpoints; + //qDebug() << breakpoints; // rethrow emit deleteBreakpoints (breakpoints); @@ -576,7 +576,7 @@ void SeerEditorManagerWidget::handleDeleteBreakpoints (QString breakpoints) { void SeerEditorManagerWidget::handleEnableBreakpoints (QString breakpoints) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << breakpoints; + //qDebug() << breakpoints; // rethrow emit enableBreakpoints (breakpoints); @@ -584,7 +584,7 @@ void SeerEditorManagerWidget::handleEnableBreakpoints (QString breakpoints) { void SeerEditorManagerWidget::handleDisableBreakpoints (QString breakpoints) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << breakpoints; + //qDebug() << breakpoints; // rethrow emit disableBreakpoints (breakpoints); @@ -592,7 +592,7 @@ void SeerEditorManagerWidget::handleDisableBreakpoints (QString breakpoints) { void SeerEditorManagerWidget::handleRunToLine (QString fullname, int lineno) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname << lineno; + //qDebug() << fullname << lineno; // rethrow emit runToLine (fullname, lineno); @@ -600,7 +600,7 @@ void SeerEditorManagerWidget::handleRunToLine (QString fullname, int lineno) { void SeerEditorManagerWidget::handleAddVariableLoggerExpression (QString expression) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << expression; + //qDebug() << expression; // rethrow emit addVariableLoggerExpression (expression); @@ -608,7 +608,7 @@ void SeerEditorManagerWidget::handleAddVariableLoggerExpression (QString express void SeerEditorManagerWidget::handleAddVariableTrackerExpression (QString expression) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << expression; + //qDebug() << expression; // rethrow emit addVariableTrackerExpression (expression); @@ -616,7 +616,7 @@ void SeerEditorManagerWidget::handleAddVariableTrackerExpression (QString expres void SeerEditorManagerWidget::handleRefreshVariableTrackerValues () { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); // rethrow emit refreshVariableTrackerValues (); @@ -624,7 +624,7 @@ void SeerEditorManagerWidget::handleRefreshVariableTrackerValues () { void SeerEditorManagerWidget::handleEvaluateVariableExpression (int expressionid, QString expression) { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); // rethrow emit evaluateVariableExpression (expressionid, expression); @@ -632,7 +632,7 @@ void SeerEditorManagerWidget::handleEvaluateVariableExpression (int expressionid void SeerEditorManagerWidget::handleAddMemoryVisualizer (QString expression) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << expression; + //qDebug() << expression; // rethrow emit addMemoryVisualize (expression); diff --git a/src/SeerEditorWidget.cpp b/src/SeerEditorWidget.cpp index db3f912..b96f7af 100644 --- a/src/SeerEditorWidget.cpp +++ b/src/SeerEditorWidget.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -24,19 +25,21 @@ SeerEditorWidget::SeerEditorWidget(QWidget *parent) : QWidget(parent) { // Set the widgets. int space = fontMetrics().horizontalAdvance("Go to line ##") + 5; - lineNumberLineEdit->setMaximumWidth(space); + searchLineNumberLineEdit->setMaximumWidth(space); showSearchBar(false); // Hide the search bar. ctrl+F to show it again. showAlternateBar(false); // Hide the alternate bar. ctrl+O to show it again. // Connect things. - QObject::connect(searchTextLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleSearchTextLineEdit); - QObject::connect(searchDownToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleSearchDownToolButton); - QObject::connect(searchUpToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleSearchUpToolButton); - QObject::connect(lineNumberLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleLineNumberLineEdit); - QObject::connect(closeToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleCloseToolButton); - QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showSearchBar, this, &SeerEditorWidget::showSearchBar); - QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showAlternateBar, this, &SeerEditorWidget::showAlternateBar); + QObject::connect(searchTextLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleSearchTextLineEdit); + QObject::connect(searchDownToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleSearchDownToolButton); + QObject::connect(searchUpToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleSearchUpToolButton); + QObject::connect(searchLineNumberLineEdit, &QLineEdit::returnPressed, this, &SeerEditorWidget::handleSearchLineNumberLineEdit); + QObject::connect(searchCloseToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleSearchCloseToolButton); + QObject::connect(alternateCloseToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleAlternateCloseToolButton); + QObject::connect(alternateFileOpenToolButton, &QToolButton::clicked, this, &SeerEditorWidget::handleAlternateFileOpenToolButton); + QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showSearchBar, this, &SeerEditorWidget::showSearchBar); + QObject::connect(sourceWidget, &SeerEditorWidgetSourceArea::showAlternateBar, this, &SeerEditorWidget::showAlternateBar); } SeerEditorWidget::~SeerEditorWidget () { @@ -46,9 +49,9 @@ SeerEditorWidgetSourceArea* SeerEditorWidget::sourceArea () { return sourceWidget; } -void SeerEditorWidget::handleLineNumberLineEdit () { +void SeerEditorWidget::handleSearchLineNumberLineEdit () { - QString str = lineNumberLineEdit->text(); + QString str = searchLineNumberLineEdit->text(); if (str == "") { return; @@ -60,7 +63,7 @@ void SeerEditorWidget::handleLineNumberLineEdit () { return; } - lineNumberLineEdit->clear(); + searchLineNumberLineEdit->clear(); sourceArea()->scrollToLine(lineno); } @@ -170,7 +173,22 @@ bool SeerEditorWidget::isAlternateBarShown () const { return shown; } -void SeerEditorWidget::handleCloseToolButton () { +void SeerEditorWidget::handleSearchCloseToolButton () { showSearchBar(false); } +void SeerEditorWidget::handleAlternateCloseToolButton () { + showAlternateBar(false); +} + +void SeerEditorWidget::handleAlternateFileOpenToolButton () { + + qDebug() << "fullname=" << sourceArea()->fullname(); + qDebug() << "file =" << sourceArea()->file(); + + QString fileName = QFileDialog::getOpenFileName(this, "Locate File", sourceArea()->fullname(), QString("File (%1)").arg(sourceArea()->file()), nullptr, QFileDialog::DontUseNativeDialog); + + qDebug() << "location=" << fileName; + qDebug() << "path =" << QFileInfo(fileName).absolutePath(); +} + diff --git a/src/SeerEditorWidgetMiniMapArea.cpp b/src/SeerEditorWidgetMiniMapArea.cpp index ff61f30..bd16c10 100644 --- a/src/SeerEditorWidgetMiniMapArea.cpp +++ b/src/SeerEditorWidgetMiniMapArea.cpp @@ -18,7 +18,7 @@ void SeerEditorWidgetMiniMapArea::mouseDoubleClickEvent (QMouseEvent* event) { QTextCursor cursor = _editorWidget->cursorForPosition(event->pos()); - qDebug() << __PRETTY_FUNCTION__ << ":" << cursor.blockNumber()+1; + qDebug() << cursor.blockNumber()+1; QWidget::mouseDoubleClickEvent(event); } @@ -27,7 +27,7 @@ void SeerEditorWidgetMiniMapArea::mouseMoveEvent (QMouseEvent* event) { QTextCursor cursor = _editorWidget->cursorForPosition(event->pos()); - qDebug() << __PRETTY_FUNCTION__ << ":" << cursor.blockNumber()+1; + qDebug() << cursor.blockNumber()+1; QWidget::mouseMoveEvent(event); } @@ -36,7 +36,7 @@ void SeerEditorWidgetMiniMapArea::mousePressEvent (QMouseEvent* event) { QTextCursor cursor = _editorWidget->cursorForPosition(event->pos()); - qDebug() << __PRETTY_FUNCTION__ << ":" << cursor.blockNumber()+1; + qDebug() << cursor.blockNumber()+1; QWidget::mousePressEvent(event); } @@ -45,7 +45,7 @@ void SeerEditorWidgetMiniMapArea::mouseReleaseEvent (QMouseEvent* event) { QTextCursor cursor = _editorWidget->cursorForPosition(event->pos()); - qDebug() << __PRETTY_FUNCTION__ << ":" << cursor.blockNumber()+1; + qDebug() << cursor.blockNumber()+1; QWidget::mouseReleaseEvent(event); } diff --git a/src/SeerEditorWidgetSourceArea.cpp b/src/SeerEditorWidgetSourceArea.cpp index 20b5d89..123df88 100644 --- a/src/SeerEditorWidgetSourceArea.cpp +++ b/src/SeerEditorWidgetSourceArea.cpp @@ -311,7 +311,7 @@ void SeerEditorWidgetSourceArea::miniMapAreaPaintEvent (QPaintEvent* event) { return; } - qDebug() << __PRETTY_FUNCTION__ << ":" << "Top:" << event->rect().top() << " Right:" << event->rect().right() << " Width:" << event->rect().width() << " Height:" << event->rect().height(); + qDebug() << "Top:" << event->rect().top() << " Right:" << event->rect().right() << " Width:" << event->rect().width() << " Height:" << event->rect().height(); if (_miniMapPixmap == 0) { @@ -339,7 +339,7 @@ void SeerEditorWidgetSourceArea::miniMapAreaPaintEvent (QPaintEvent* event) { } } - qDebug() << __PRETTY_FUNCTION__ << ":" << "PIXMAP = " << pixmapWidth << " x " << pixmapHeight; + qDebug() << "PIXMAP = " << pixmapWidth << " x " << pixmapHeight; QTextCharFormat format = highlighterSettings().get("Margin"); @@ -681,7 +681,7 @@ void SeerEditorWidgetSourceArea::close () { void SeerEditorWidgetSourceArea::setCurrentLine (int lineno) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << lineno << file(); + //qDebug() << lineno << file(); // Highlight if a valid line number is selected. if (lineno < 1) { @@ -700,7 +700,7 @@ void SeerEditorWidgetSourceArea::setCurrentLine (int lineno) { void SeerEditorWidgetSourceArea::scrollToLine (int lineno) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << lineno << file(); + //qDebug() << lineno << file(); // Scroll to the first line if we went before it. if (lineno < 1) { @@ -723,7 +723,7 @@ void SeerEditorWidgetSourceArea::scrollToLine (int lineno) { void SeerEditorWidgetSourceArea::clearCurrentLines () { - //qDebug() << __PRETTY_FUNCTION__ << ":" << file(); + //qDebug() << file(); _currentLineCursors.resize(0); @@ -732,7 +732,7 @@ void SeerEditorWidgetSourceArea::clearCurrentLines () { void SeerEditorWidgetSourceArea::addCurrentLine (int lineno) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << lineno << file(); + //qDebug() << lineno << file(); QTextBlock block = document()->findBlockByLineNumber(lineno-1); QTextCursor cursor = textCursor(); @@ -961,7 +961,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin return; } - //qDebug() << __PRETTY_FUNCTION__ << ":" << dlg.breakpointText(); + //qDebug() << dlg.breakpointText(); // Emit the create breakpoint signal. emit insertBreakpoint(dlg.breakpointText()); @@ -972,7 +972,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle deleting a breakpoint. if (action == deleteAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "deleteBreakpoints" << lineno; + //qDebug() << "deleteBreakpoints" << lineno; // Emit the delete breakpoint signal. emit deleteBreakpoints(QString("%1").arg(breakpointLineToNumber(lineno))); @@ -983,7 +983,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle enabling a breakpoint. if (action == enableAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "enableBreakpoints" << lineno; + //qDebug() << "enableBreakpoints" << lineno; // Emit the enable breakpoint signal. emit enableBreakpoints(QString("%1").arg(breakpointLineToNumber(lineno))); @@ -994,7 +994,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle disabling a breakpoint. if (action == disableAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "disableBreakpoints" << lineno; + //qDebug() << "disableBreakpoints" << lineno; // Emit the disable breakpoint signal. emit disableBreakpoints(QString("%1").arg(breakpointLineToNumber(lineno))); @@ -1005,7 +1005,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle running to a line number. if (action == runToLineAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "runToLine" << lineno; + //qDebug() << "runToLine" << lineno; // Emit the runToLine signal. emit runToLine(fullname(), lineno); @@ -1016,7 +1016,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to log. if (action == addVariableLoggerExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableLoggerExpression" << lineno; + //qDebug() << "addVariableLoggerExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1029,7 +1029,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to log. if (action == addVariableLoggerAsteriskExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableLoggerAsteriskExpression" << lineno; + //qDebug() << "addVariableLoggerAsteriskExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1042,7 +1042,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to log. if (action == addVariableLoggerAmpersandExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableLoggerAmpersandExpression" << lineno; + //qDebug() << "addVariableLoggerAmpersandExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1055,7 +1055,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to log. if (action == addVariableLoggerAsteriskAmpersandExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableLoggerAsteriskAmpersandExpression" << lineno; + //qDebug() << "addVariableLoggerAsteriskAmpersandExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1068,7 +1068,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to track. if (action == addVariableTrackerExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableTrackerExpression" << lineno; + //qDebug() << "addVariableTrackerExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1082,7 +1082,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to track. if (action == addVariableTrackerAsteriskExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableTrackerAsteriskExpression" << lineno; + //qDebug() << "addVariableTrackerAsteriskExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1096,7 +1096,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to track. if (action == addVariableTrackerAmpersandExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableTrackerAmpersandExpression" << lineno; + //qDebug() << "addVariableTrackerAmpersandExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1110,7 +1110,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding a variable to track. if (action == addVariableTrackerAsteriskAmpersandExpressionAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addVariableTrackerAsteriskAmpersandExpression" << lineno; + //qDebug() << "addVariableTrackerAsteriskAmpersandExpression" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1124,7 +1124,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding memory to visualize. if (action == addMemoryVisualizerAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addMemoryVisualizer" << lineno; + //qDebug() << "addMemoryVisualizer" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1137,7 +1137,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding memory to visualize. if (action == addMemoryAsteriskVisualizerAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addMemoryAsteriskVisualizer" << lineno; + //qDebug() << "addMemoryAsteriskVisualizer" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1150,7 +1150,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin // Handle adding memory to visualize. if (action == addMemoryAmpersandVisualizerAction) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "addMemoryAmpersandVisualizer" << lineno; + //qDebug() << "addMemoryAmpersandVisualizer" << lineno; // Emit the signals. if (textCursor().selectedText() != "") { @@ -1251,8 +1251,8 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { QString file_text = Seer::parseFirst(frame_text, "file=", '"', '"', false); QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << fullname_text << file_text << line_text; + //qDebug() << frame_text; + //qDebug() << fullname_text << file_text << line_text; // Read the file if it hasn't been read before or if we are reading a different file. if (fullname_text != fullname()) { @@ -1275,7 +1275,7 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { _selectedExpressionValue = Seer::filterEscapes(Seer::parseFirst(text, "value=", '"', '"', false)); - //qDebug() << __PRETTY_FUNCTION__ << ":" << _selectedExpressionValue; + //qDebug() << _selectedExpressionValue; } return; @@ -1291,7 +1291,7 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { _selectedExpressionValue = Seer::filterEscapes(Seer::parseFirst(text, "msg=", '"', '"', false)); - //qDebug() << __PRETTY_FUNCTION__ << ":" << _selectedExpressionValue; + //qDebug() << _selectedExpressionValue; } return; @@ -1301,7 +1301,7 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { return; } - qDebug() << __PRETTY_FUNCTION__ << ":" << text; + qDebug() << text; } void SeerEditorWidgetSourceArea::handleHighlighterSettingsChanged () { @@ -1311,7 +1311,7 @@ void SeerEditorWidgetSourceArea::handleHighlighterSettingsChanged () { // But the palettle method works (for now). QTextCharFormat format = highlighterSettings().get("Text"); - // qDebug() << __PRETTY_FUNCTION__ << ":" << QString("QPlainTextEdit {background-color: %1;}").arg(format.background().color().name()); + // qDebug() << QString("QPlainTextEdit {background-color: %1;}").arg(format.background().color().name()); // #cecece // setStyleSheet( QString("QPlainTextEdit {background-color: %1;}").arg(format.background().color().name()) ); // setStyleSheet( QString("QPlainTextEdit {foreground-color: %1;}").arg(format.foreground().color().name()) ); diff --git a/src/SeerGdbWidget.cpp b/src/SeerGdbWidget.cpp index eafbf7d..955a5e5 100644 --- a/src/SeerGdbWidget.cpp +++ b/src/SeerGdbWidget.cpp @@ -327,7 +327,7 @@ void SeerGdbWidget::handleText (const QString& text) { QString pid_text = Seer::parseFirst(text, "pid=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Inferior pid = " << pid_text; + //qDebug() << "Inferior pid = " << pid_text; setExecutablePid(pid_text.toLong()); @@ -338,7 +338,7 @@ void SeerGdbWidget::handleText (const QString& text) { void SeerGdbWidget::handleExecute () { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "QComboBox: " << manualCommandComboBox->currentText(); + //qDebug() << "QComboBox: " << manualCommandComboBox->currentText(); QString command = manualCommandComboBox->currentText(); manualCommandComboBox->clearEditText(); @@ -449,7 +449,7 @@ void SeerGdbWidget::handleGdbStartExecutable () { return; } - //qDebug() << __PRETTY_FUNCTION__ << ": newExecutableFlag = " << newExecutableFlag(); + //qDebug() << ": newExecutableFlag = " << newExecutableFlag(); // Kill previous gdb, if any. if (isGdbRuning() == true) { @@ -775,7 +775,7 @@ void SeerGdbWidget::handleGdbTtyDeviceName () { if (_consoleWidget->ttyDeviceName() != "") { - //qDebug() << __PRETTY_FUNCTION__ << "Setting TTY name to" << _consoleWidget->ttyDeviceName(); + //qDebug() << "Setting TTY name to" << _consoleWidget->ttyDeviceName(); handleGdbCommand(QString("-inferior-tty-set ") + _consoleWidget->ttyDeviceName()); } @@ -1085,7 +1085,7 @@ void SeerGdbWidget::handleGdbDataAddExpression (QString expression) { QString text = QString("^done,DataExpressionAdded={id=\"%1\",expression=\"%2\"}").arg(_dataExpressionId.back()).arg(_dataExpressionName.back()); - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; gdbMonitor()->handleTextOutput(text); } @@ -1215,14 +1215,14 @@ void SeerGdbWidget::handleGdbArrayVisualizer () { void SeerGdbWidget::handleSplitterMoved (int pos, int index) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Splitter moved to " << pos << index; + //qDebug() << "Splitter moved to " << pos << index; writeSettings(); } void SeerGdbWidget::handleManualCommandChanged () { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Manual Command ComboBox changed"; + //qDebug() << "Manual Command ComboBox changed"; writeSettings(); } @@ -1232,14 +1232,14 @@ void SeerGdbWidget::handleGdbProcessFinished (int exitCode, QProcess::ExitStatus Q_UNUSED(exitCode); Q_UNUSED(exitStatus); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Gdb process finished. Exit code =" << exitCode << "Exit status =" << exitStatus; + //qDebug() << "Gdb process finished. Exit code =" << exitCode << "Exit status =" << exitStatus; } void SeerGdbWidget::handleGdbProcessErrored (QProcess::ProcessError errorStatus) { Q_UNUSED(errorStatus); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Error launching gdb process. Error =" << errorStatus; + //qDebug() << "Error launching gdb process. Error =" << errorStatus; if (errorStatus == QProcess::FailedToStart) { QMessageBox::warning(this, "Seer", @@ -1268,7 +1268,7 @@ void SeerGdbWidget::writeSettings () { QStringList commands = manualCommands(rememberManualCommandCount()); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Commands =" << commands; + //qDebug() << "Commands =" << commands; for (int i = 0; i < commands.size(); ++i) { settings.setArrayIndex(i); @@ -1320,7 +1320,7 @@ void SeerGdbWidget::startGdb () { // Don't do anything, if already running. if (isGdbRuning()) { - qDebug() << __PRETTY_FUNCTION__ << ":" << "Already running"; + qDebug() << "Already running"; return; } @@ -1353,7 +1353,7 @@ void SeerGdbWidget::killGdb () { // Sanity check. if (isGdbRuning()) { - qDebug() << __PRETTY_FUNCTION__ << ":" << "Is running but shouldn't be."; + qDebug() << "Is running but shouldn't be."; } // Clear the launch mode. @@ -1424,7 +1424,7 @@ void SeerGdbWidget::setManualCommands (const QStringList& commands) { QStringList SeerGdbWidget::manualCommands(int count) const { - //qDebug() << __PRETTY_FUNCTION__ << "Count =" << count; + //qDebug() << "Count =" << count; // Select all if a zero. if (count == 0) { @@ -1470,7 +1470,7 @@ void SeerGdbWidget::clearManualCommandHistory () { void SeerGdbWidget::sendGdbInterrupt (int signal) { - //qDebug() << __PRETTY_FUNCTION__ << "Sending an interrupt to the program. Signal =" << signal; + //qDebug() << "Sending an interrupt to the program. Signal =" << signal; if (executableLaunchMode() == "") { return; diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index 6e2f397..3ef2a3c 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -363,7 +363,7 @@ void SeerMainWindow::handleText (const QString& text) { // ^error,msg="The program is not being run." // ^error,msg="ptrace: No such process." - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QString newtext = Seer::filterEscapes(text); // Filter escaped characters. @@ -555,7 +555,7 @@ void SeerMainWindow::handleText (const QString& text) { return; } - qDebug() << __PRETTY_FUNCTION__ << ":" << text; + qDebug() << text; } void SeerMainWindow::handleRunStatusChanged (SeerRunStatusIndicator::RunStatus status) { @@ -590,7 +590,7 @@ void SeerMainWindow::writeSettings() { settings.setValue("size", size()); } settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerMainWindow::readSettings() { @@ -601,7 +601,7 @@ void SeerMainWindow::readSettings() { resize(settings.value("size", QSize(1250, 1000)).toSize()); } settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerMainWindow::writeConfigSettings () { diff --git a/src/SeerMemoryVisualizerWidget.cpp b/src/SeerMemoryVisualizerWidget.cpp index 5be5ee5..87d52e8 100644 --- a/src/SeerMemoryVisualizerWidget.cpp +++ b/src/SeerMemoryVisualizerWidget.cpp @@ -108,7 +108,7 @@ void SeerMemoryVisualizerWidget::setVariableAddress (const QString& address) { offset = 0; } - //qDebug() << __PRETTY_FUNCTION__ << ":" << address << offset << ok; + //qDebug() << address << offset << ok; memoryHexEditor->setAddressOffset(offset); } @@ -119,7 +119,7 @@ QString SeerMemoryVisualizerWidget::variableAddress () const { void SeerMemoryVisualizerWidget::handleText (const QString& text) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { @@ -144,7 +144,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { if (id_text.toInt() == _memoryId) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QString memory_text = Seer::parseFirst(text, "memory=", '[', ']', false); @@ -155,7 +155,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { QString contents_text = Seer::parseFirst(range_text, "contents=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << contents_text; + //qDebug() << contents_text; // Convert hex string to byte array. QByteArray array; @@ -337,7 +337,7 @@ void SeerMemoryVisualizerWidget::writeSettings() { settings.setValue("size", size()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerMemoryVisualizerWidget::readSettings() { @@ -348,7 +348,7 @@ void SeerMemoryVisualizerWidget::readSettings() { resize(settings.value("size", QSize(800, 400)).toSize()); settings.endGroup(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << size(); + //qDebug() << size(); } void SeerMemoryVisualizerWidget::resizeEvent (QResizeEvent* event) { diff --git a/src/SeerRegisterValuesBrowserWidget.cpp b/src/SeerRegisterValuesBrowserWidget.cpp index ab492df..e0d76f9 100644 --- a/src/SeerRegisterValuesBrowserWidget.cpp +++ b/src/SeerRegisterValuesBrowserWidget.cpp @@ -52,7 +52,7 @@ void SeerRegisterValuesBrowserWidget::handleText (const QString& text) { QString frame_text = Seer::parseFirst(newtext, "register-names=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; + //qDebug() << frame_text; QStringList name_list = Seer::parse(frame_text, "", '"', '"', false); @@ -89,7 +89,7 @@ void SeerRegisterValuesBrowserWidget::handleText (const QString& text) { // {number=\"3\",value=\"0x7fffffffd548\"},{number=\"4\",value=\"0x7fffffffd538\"},{number=\"5\",value=\"0x1\"},... // {number=\"205\",value=\"0x0\"},{number=\"206\",value=\"0x0\"}]" - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QString newtext = Seer::filterEscapes(text); // Filter escaped characters. @@ -155,7 +155,7 @@ void SeerRegisterValuesBrowserWidget::refresh () { void SeerRegisterValuesBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(1) + " : " + item->text(2)); diff --git a/src/SeerRunStatusIndicator.cpp b/src/SeerRunStatusIndicator.cpp index d8f1ddf..ef3c741 100644 --- a/src/SeerRunStatusIndicator.cpp +++ b/src/SeerRunStatusIndicator.cpp @@ -59,7 +59,7 @@ void SeerRunStatusIndicator::handleText (const QString& text) { }else{ // All other text is ignored by this widget. - qDebug() << __PRETTY_FUNCTION__ << ":" << text; + qDebug() << text; } } diff --git a/src/SeerSharedLibraryBrowserWidget.cpp b/src/SeerSharedLibraryBrowserWidget.cpp index f7c3adc..e4d19b3 100644 --- a/src/SeerSharedLibraryBrowserWidget.cpp +++ b/src/SeerSharedLibraryBrowserWidget.cpp @@ -55,7 +55,7 @@ void SeerSharedLibraryBrowserWidget::handleText (const QString& text) { QString libraries_text = Seer::parseFirst(text, "shared-libraries=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << libraries_text; + //qDebug() << libraries_text; QStringList libraries_list = Seer::parse(libraries_text, "", '{', '}', false); @@ -154,7 +154,7 @@ void SeerSharedLibraryBrowserWidget::handleSearchLineEdit (const QString& text) } } - //qDebug() << __PRETTY_FUNCTION__ << ":" << text << matches.size(); + //qDebug() << text << matches.size(); } sharedLibraryTreeWidget->resizeColumnToContents(0); diff --git a/src/SeerSlashProcWidget.cpp b/src/SeerSlashProcWidget.cpp index b5f0edd..7cb2c1a 100644 --- a/src/SeerSlashProcWidget.cpp +++ b/src/SeerSlashProcWidget.cpp @@ -178,13 +178,13 @@ void SeerSlashProcWidget::refreshView () { if (systemProcessesCheckBox->isChecked() == true) { processMatches = processTreeWidget->findItems("*", Qt::MatchWildcard | Qt::MatchRecursive, 2); - //qDebug() << __PRETTY_FUNCTION__ << ": Checkbox is on." << processMatches.size(); + //qDebug() << "Checkbox is on." << processMatches.size(); }else{ // To find [xxx] processes : "^(\\[).*(\\])$" // To exclude [xxx] processes: "^(?!\\[).*(?!\\])$" processMatches = processTreeWidget->findItems("^(?!\\[).*(?!\\])$", Qt::MatchRegExp | Qt::MatchRecursive, 2); - //qDebug() << __PRETTY_FUNCTION__ << ": Checkbox is off." << processMatches.size(); + //qDebug() << "Checkbox is off." << processMatches.size(); } // Go through each item in the tree. If it's in the user, program, and process matches, show it. diff --git a/src/SeerSourceBrowserWidget.cpp b/src/SeerSourceBrowserWidget.cpp index eeb2fc0..a50d50d 100644 --- a/src/SeerSourceBrowserWidget.cpp +++ b/src/SeerSourceBrowserWidget.cpp @@ -65,7 +65,7 @@ void SeerSourceBrowserWidget::handleText (const QString& text) { QString files_text = Seer::parseFirst(text, "files=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << files_text; + //qDebug() << files_text; QStringList files_list = Seer::parse(files_text, "", '{', '}', false); @@ -74,7 +74,7 @@ void SeerSourceBrowserWidget::handleText (const QString& text) { QString file_text = Seer::parseFirst(entry_text, "file=", '"', '"', false); QString fullname_text = Seer::parseFirst(entry_text, "fullname=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << file_text << fullname_text; + //qDebug() << file_text << fullname_text; // Get information about the file. QFileInfo fileInfo(fullname_text); @@ -128,7 +128,7 @@ void SeerSourceBrowserWidget::handleItemDoubleClicked (QTreeWidgetItem* item, in void SeerSourceBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; if (item->text(1) == "") { // Look at the FullName. for (int i=0; icolumnCount(); i++) { // The top-level items do not have a tooltip. @@ -217,7 +217,7 @@ void SeerSourceBrowserWidget::handleSearchLineEdit (const QString& text) { _headerFilesItems->setExpanded(false); _miscFilesItems->setExpanded(false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << text << matches.size(); + //qDebug() << text << matches.size(); } sourceTreeWidget->resizeColumnToContents(0); diff --git a/src/SeerStackArgumentsBrowserWidget.cpp b/src/SeerStackArgumentsBrowserWidget.cpp index 3b06e9c..f3d876c 100644 --- a/src/SeerStackArgumentsBrowserWidget.cpp +++ b/src/SeerStackArgumentsBrowserWidget.cpp @@ -39,7 +39,7 @@ void SeerStackArgumentsBrowserWidget::handleText (const QString& text) { argumentsTreeWidget->clear(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // ^done,stack-args=[ // frame={level="0",args=[ @@ -56,17 +56,17 @@ void SeerStackArgumentsBrowserWidget::handleText (const QString& text) { QStringList frame_list = Seer::parse(text, "frame=", '{', '}', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_list.count() << frame_list; + //qDebug() << frame_list.count() << frame_list; for ( const auto& frame_text : frame_list ) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << frame_text; + //qDebug() << frame_text; QString level_text = Seer::parseFirst(frame_text, "level=", '"', '"', false); QString args_text = Seer::parseFirst(frame_text, "args=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << level_text; - //qDebug() << __PRETTY_FUNCTION__ << ":" << args_text; + //qDebug() << level_text; + //qDebug() << args_text; QStringList namevalue_list = Seer::parse(args_text, "", '{', '}', false); @@ -123,7 +123,7 @@ void SeerStackArgumentsBrowserWidget::refresh () { void SeerStackArgumentsBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; if (item->text(0) != "") { for (int i=0; icolumnCount(); i++) { // The "level" item does not have a tooltip. diff --git a/src/SeerStackFramesBrowserWidget.cpp b/src/SeerStackFramesBrowserWidget.cpp index d430389..d5d7917 100644 --- a/src/SeerStackFramesBrowserWidget.cpp +++ b/src/SeerStackFramesBrowserWidget.cpp @@ -51,7 +51,7 @@ void SeerStackFramesBrowserWidget::handleText (const QString& text) { // frame={level=\"1\",addr=\"0x0000000000400cc3\",func=\"main\",file=\"helloworld.cpp\",fullname=\"/home/erniep/Development/Peak/src/Seer/helloworld/helloworld.cpp\",line=\"14\",arch=\"i386:x86-64\"} // ] - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // If we are simply moving up and down the stack (via frame-select) then the text won't change. // If it is different, reconstruct the tree. Select the first frame. @@ -83,7 +83,7 @@ void SeerStackFramesBrowserWidget::handleText (const QString& text) { QString line_text = Seer::parseFirst(frame_text, "line=", '"', '"', false); QString arch_text = Seer::parseFirst(frame_text, "arch=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << file_text << fullname_text; + //qDebug() << file_text << fullname_text; // Create the item. QTreeWidgetItem* item = new QTreeWidgetItem; @@ -174,7 +174,7 @@ void SeerStackFramesBrowserWidget::handleItemDoubleClicked (QTreeWidgetItem* ite int lineno = item->text(3).toInt(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Emit selectedFile and selectedFrame"; + //qDebug() << "Emit selectedFile and selectedFrame"; emit selectedFile(item->text(2), item->text(4), lineno); emit selectedFrame(item->text(0).toInt()); @@ -182,7 +182,7 @@ void SeerStackFramesBrowserWidget::handleItemDoubleClicked (QTreeWidgetItem* ite void SeerStackFramesBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(0) + " : " + item->text(1) + " : " + item->text(2) + " : " + item->text(3)); diff --git a/src/SeerStackLocalsBrowserWidget.cpp b/src/SeerStackLocalsBrowserWidget.cpp index 5d2fa17..66a84e9 100644 --- a/src/SeerStackLocalsBrowserWidget.cpp +++ b/src/SeerStackLocalsBrowserWidget.cpp @@ -58,7 +58,7 @@ void SeerStackLocalsBrowserWidget::handleText (const QString& text) { // {name=\"something\",arg=\"1\",value=\"\\\"Hello, World!\\\"\"} // ] - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QString frame_text = Seer::parseFirst(text, "variables=", '[', ']', false); @@ -209,7 +209,7 @@ void SeerStackLocalsBrowserWidget::handleItemCollapsed (QTreeWidgetItem* item) { void SeerStackLocalsBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(0) + " : " + item->text(2)); diff --git a/src/SeerThreadFramesBrowserWidget.cpp b/src/SeerThreadFramesBrowserWidget.cpp index e78c570..cf75b93 100644 --- a/src/SeerThreadFramesBrowserWidget.cpp +++ b/src/SeerThreadFramesBrowserWidget.cpp @@ -88,14 +88,14 @@ void SeerThreadFramesBrowserWidget::handleText (const QString& text) { // current-thread-id=\"1\" // - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; threadTreeWidget->clear(); QString threads_text = Seer::parseFirst(text, "threads=", '[', ']', false); QString currentthreadid_text = Seer::parseFirst(text, "current-thread-id=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << threads_text; + //qDebug() << threads_text; if (threads_text != "") { @@ -119,7 +119,7 @@ void SeerThreadFramesBrowserWidget::handleText (const QString& text) { QString state_text = Seer::parseFirst(thread_text, "state=", '"', '"', false); QString core_text = Seer::parseFirst(thread_text, "core=", '"', '"', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << file_text << fullname_text; + //qDebug() << file_text << fullname_text; // Create the item. QTreeWidgetItem* item = new QTreeWidgetItem; @@ -201,7 +201,7 @@ void SeerThreadFramesBrowserWidget::handleItemDoubleClicked (QTreeWidgetItem* it int lineno = item->text(5).toInt(); - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Emit selectedFile and selectedFrame"; + //qDebug() << "Emit selectedFile and selectedFrame"; emit selectedFile(item->text(4), item->text(6), lineno); @@ -211,7 +211,7 @@ void SeerThreadFramesBrowserWidget::handleItemDoubleClicked (QTreeWidgetItem* it void SeerThreadFramesBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(0) + " : " + item->text(1) + " : " + item->text(3) + " : " + item->text(4) + " : " + item->text(5)); diff --git a/src/SeerThreadIdsBrowserWidget.cpp b/src/SeerThreadIdsBrowserWidget.cpp index e4f0be6..0f84c33 100644 --- a/src/SeerThreadIdsBrowserWidget.cpp +++ b/src/SeerThreadIdsBrowserWidget.cpp @@ -53,7 +53,7 @@ void SeerThreadIdsBrowserWidget::handleText (const QString& text) { // Add the thread-ids. for ( const auto& threadid_text : threadids_list ) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << threadid_text; + //qDebug() << threadid_text; // Construct the item QTreeWidgetItem* item = new QTreeWidgetItem; diff --git a/src/SeerVariableLoggerBrowserWidget.cpp b/src/SeerVariableLoggerBrowserWidget.cpp index 7bf8c20..7507d0c 100644 --- a/src/SeerVariableLoggerBrowserWidget.cpp +++ b/src/SeerVariableLoggerBrowserWidget.cpp @@ -43,7 +43,7 @@ void SeerVariableLoggerBrowserWidget::handleText (const QString& text) { if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "6^done,value=\"\\\"abc\\\"\"" @@ -58,7 +58,7 @@ void SeerVariableLoggerBrowserWidget::handleText (const QString& text) { }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "1^error,msg=\"No symbol \\\"j\\\" in current context.\"" @@ -126,7 +126,7 @@ void SeerVariableLoggerBrowserWidget::handleEvaluateVariableExpression (int expr void SeerVariableLoggerBrowserWidget::addVariableExpression (QString expression) { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); if (expression != "") { @@ -138,7 +138,7 @@ void SeerVariableLoggerBrowserWidget::addVariableExpression (QString expression) void SeerVariableLoggerBrowserWidget::handleAddLineEdit () { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); QString variable = variableAddLineEdit->text(); @@ -183,7 +183,7 @@ void SeerVariableLoggerBrowserWidget::handleDeleteAllToolButton () { void SeerVariableLoggerBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(1) + " : " + item->text(2) + " : " + item->text(3)); diff --git a/src/SeerVariableTrackerBrowserWidget.cpp b/src/SeerVariableTrackerBrowserWidget.cpp index 9bb00b8..67e6a0e 100644 --- a/src/SeerVariableTrackerBrowserWidget.cpp +++ b/src/SeerVariableTrackerBrowserWidget.cpp @@ -46,7 +46,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { if (text.startsWith("^done,DataExpressionTable={") && text.endsWith("}")) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "^done,DataExpressionTable={ // entry={id=\"1\",expression=\"s\"}, @@ -78,7 +78,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { }else if (text.startsWith("^done,DataExpressionAdded={") && text.endsWith("}")) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << "Refresh"; + //qDebug() << "Refresh"; // "^done,DataExpressionAdded={ // id=\"5\", @@ -99,7 +99,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { }else if (text.startsWith("^done,DataExpressionDeleted={") && text.endsWith("}")) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "^done,DataExpressionDeleted={ // entry={id=\"1\",expression=\"s\"}, @@ -124,7 +124,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "6^done,value=\"\\\"abc\\\"\"" @@ -139,7 +139,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; // "1^error,msg=\"No symbol \\\"j\\\" in current context.\"" @@ -187,7 +187,7 @@ void SeerVariableTrackerBrowserWidget::refreshValues () { void SeerVariableTrackerBrowserWidget::handleAddLineEdit () { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); QString variable = variableAddLineEdit->text(); @@ -203,7 +203,7 @@ void SeerVariableTrackerBrowserWidget::handleAddLineEdit () { void SeerVariableTrackerBrowserWidget::handleDeleteToolButton () { - //qDebug() << __PRETTY_FUNCTION__ << ":"; + //qDebug(); // Get selected tree items. QList items = variablesTreeWidget->selectedItems(); @@ -236,7 +236,7 @@ void SeerVariableTrackerBrowserWidget::handleDeleteAllToolButton () { void SeerVariableTrackerBrowserWidget::handleItemEntered (QTreeWidgetItem* item, int column) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << item->text(0) << column; + //qDebug() << item->text(0) << column; item->setToolTip(0, item->text(1) + " : " + item->text(2)); diff --git a/src/SeerWatchpointsBrowserWidget.cpp b/src/SeerWatchpointsBrowserWidget.cpp index f7d19d6..7947bf2 100644 --- a/src/SeerWatchpointsBrowserWidget.cpp +++ b/src/SeerWatchpointsBrowserWidget.cpp @@ -75,7 +75,7 @@ QStringList SeerWatchpointsBrowserWidget::watchpointsText () const { watchpointList.append(watchpointParameters); - //qDebug() << __PRETTY_FUNCTION__ << ":" << watchpointParameters; + //qDebug() << watchpointParameters; ++it; } @@ -129,7 +129,7 @@ void SeerWatchpointsBrowserWidget::handleText (const QString& text) { QString body_text = Seer::parseFirst(newtext, "body=", '[', ']', false); - //qDebug() << __PRETTY_FUNCTION__ << ":" << body_text; + //qDebug() << body_text; // No rows? Just clear the tree. if (body_text == "") { @@ -248,7 +248,7 @@ void SeerWatchpointsBrowserWidget::handleText (const QString& text) { // Find watchpoint number in the tree QList matches = watchpointsTreeWidget->findItems(number_text, Qt::MatchExactly, 0); if (matches.size() > 0) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QTreeWidgetItem* item = matches.first(); item->setText(6, file_text); item->setText(7, fullname_text); @@ -273,7 +273,7 @@ void SeerWatchpointsBrowserWidget::handleText (const QString& text) { // Find watchpoint number in the tree QList matches = watchpointsTreeWidget->findItems(number_text, Qt::MatchExactly, 0); if (matches.size() > 0) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QTreeWidgetItem* item = matches.first(); item->setText(6, file_text); item->setText(7, fullname_text); @@ -299,7 +299,7 @@ void SeerWatchpointsBrowserWidget::handleText (const QString& text) { // Find watchpoint number in the tree QList matches = watchpointsTreeWidget->findItems(number_text, Qt::MatchExactly, 0); if (matches.size() > 0) { - //qDebug() << __PRETTY_FUNCTION__ << ":" << text; + //qDebug() << text; QTreeWidgetItem* item = matches.first(); item->setText(6, file_text); item->setText(7, fullname_text); diff --git a/src/seer.cpp b/src/seer.cpp index e8425f3..f2f5135 100644 --- a/src/seer.cpp +++ b/src/seer.cpp @@ -6,9 +6,12 @@ #include #include #include +#include int main (int argc, char* argv[]) { + qSetMessagePattern("[%{file}:%{line}] %{message}"); + QApplication app(argc, argv); QCoreApplication::setApplicationName("Seer");