diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b6d0b3..28e5d6e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,11 +13,14 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -find_package(Qt5 COMPONENTS REQUIRED Core) -find_package(Qt5 COMPONENTS REQUIRED Gui) -find_package(Qt5 COMPONENTS REQUIRED Widgets) -find_package(Qt5 COMPONENTS REQUIRED PrintSupport) -find_package(Qt5 COMPONENTS REQUIRED Charts) + + +find_package(Qt6 COMPONENTS REQUIRED Core) +find_package(Qt6 COMPONENTS REQUIRED Gui) +find_package(Qt6 COMPONENTS REQUIRED Widgets) +find_package(Qt6 COMPONENTS REQUIRED Core5Compat) +find_package(Qt6 COMPONENTS REQUIRED PrintSupport) +find_package(Qt6 COMPONENTS REQUIRED Charts) set(HEADER_FILES GdbMonitor.h @@ -194,7 +197,7 @@ set(SOURCE_FILES QImageViewer.cpp ) -qt5_add_resources(SOURCE_FILES resource.qrc) +qt6_add_resources(SOURCE_FILES resource.qrc) # Set non-Debug build as GUI application. # Debug build remains consle application. @@ -216,5 +219,5 @@ add_executable(${PROJECT_NAME} ${SYSTEM_TYPE} ${SOURCE_FILES}) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) -target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Gui Qt5::Core Qt5::PrintSupport Qt5::Charts) +target_link_libraries(${PROJECT_NAME} Qt6::Widgets Qt6::Gui Qt6::Core Qt6::PrintSupport Qt6::Charts Qt6::Core5Compat) diff --git a/src/GdbMonitor.cpp b/src/GdbMonitor.cpp index 580a6f8..372457f 100644 --- a/src/GdbMonitor.cpp +++ b/src/GdbMonitor.cpp @@ -1,7 +1,7 @@ #include "GdbMonitor.h" #include #include -#include +#include #include #include #include @@ -97,15 +97,15 @@ void GdbMonitor::handleReadyReadStandardOutput () { emit ampersandTextOutput(text); }else if (text[0] == '@') { emit atsignTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\~"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\~"))) { emit tildeTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\="))) { emit equalTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\*"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\*"))) { emit astrixTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\^"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^"))) { emit caretTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\&"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\&"))) { emit ampersandTextOutput(text); }else{ emit textOutput(text); @@ -132,15 +132,15 @@ void GdbMonitor::handleTextOutput (QString text) { emit caretTextOutput(text); }else if (text[0] == '&') { emit ampersandTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\~"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\~"))) { emit tildeTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\="))) { emit equalTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\*"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\*"))) { emit astrixTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\^"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^"))) { emit caretTextOutput(text); - }else if (text.contains(QRegExp("^([0-9]+)\\&"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\&"))) { emit ampersandTextOutput(text); }else{ emit textOutput(text); diff --git a/src/QClearLineEdit.h b/src/QClearLineEdit.h index 182e8c9..a275e18 100644 --- a/src/QClearLineEdit.h +++ b/src/QClearLineEdit.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include class QClearLineEdit : public QLineEdit { diff --git a/src/QColorButton.cpp b/src/QColorButton.cpp index 5b56436..fffe442 100644 --- a/src/QColorButton.cpp +++ b/src/QColorButton.cpp @@ -6,7 +6,7 @@ QColorButton::QColorButton(QWidget* parent) : QWidget(parent) { - _color = palette().color(QPalette::Background); + _color = palette().color(QPalette::Window); } QColorButton::QColorButton(const QColor& color, QWidget* parent) : QWidget(parent) { diff --git a/src/QDetachTabWidget.cpp b/src/QDetachTabWidget.cpp index af73e96..fa3fc18 100644 --- a/src/QDetachTabWidget.cpp +++ b/src/QDetachTabWidget.cpp @@ -1,7 +1,7 @@ #include "QDetachTabWidget.h" #include #include -#include +#include #include #include diff --git a/src/QHistoryLineEdit.cpp b/src/QHistoryLineEdit.cpp index 9448974..1114841 100644 --- a/src/QHistoryLineEdit.cpp +++ b/src/QHistoryLineEdit.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -315,9 +315,9 @@ int QHistoryLineEdit::_wordStart () const { // lastIndexOf returns the index of the last space or -1 if there are no spaces // so that + 1 returns the index of the character starting the word or 0 - int after_space = text().leftRef(cursorPosition()).lastIndexOf(' ') + 1; + int after_space = text().left(cursorPosition()).lastIndexOf(' ') + 1; - if ( text().rightRef(text().size()-after_space).startsWith(_completionPrefix) ) { + if ( text().right(text().size()-after_space).startsWith(_completionPrefix) ) { after_space += _completionPrefix.size(); } diff --git a/src/QProcessInfo.cpp b/src/QProcessInfo.cpp index c5f68d0..2380840 100644 --- a/src/QProcessInfo.cpp +++ b/src/QProcessInfo.cpp @@ -9,7 +9,8 @@ #include "QProcessInfo.h" #include #include -#include +#include +#include #include #include #include @@ -85,7 +86,7 @@ QProcessList QProcessInfo::populate() { //qDebug() << line.split(QRegExp("\\s+")).at(0); //qDebug() << line.split(QRegExp("\\s+")).at(1); //qDebug() << ""; - info.setUsername(line.split(QRegExp("\\s+")).at(1)); + info.setUsername(line.split(QRegularExpression("\\s+")).at(1)); break; } } diff --git a/src/QProcessInfoWidget.cpp b/src/QProcessInfoWidget.cpp index 4d0c38e..c109d4c 100644 --- a/src/QProcessInfoWidget.cpp +++ b/src/QProcessInfoWidget.cpp @@ -5,6 +5,7 @@ #include #include #include +#include // @@ -183,7 +184,7 @@ void QProcessInfoWidget::refreshView () { }else{ // To find [xxx] processes : "^(\\[).*(\\])$" // To exclude [xxx] processes: "^(?!\\[).*(?!\\])$" - processMatches = processTreeWidget->findItems("^(?!\\[).*(?!\\])$", Qt::MatchRegExp | Qt::MatchRecursive, 2); + processMatches = processTreeWidget->findItems("^(?!\\[).*(?!\\])$", Qt::MatchRegularExpression | Qt::MatchRecursive, 2); //qDebug() << "Checkbox is off." << processMatches.size(); } diff --git a/src/QZoomChart.h b/src/QZoomChart.h index 8493937..6595fd4 100644 --- a/src/QZoomChart.h +++ b/src/QZoomChart.h @@ -2,8 +2,6 @@ #include -using namespace QtCharts; - class QGestureEvent; class QZoomChart : public QChart { diff --git a/src/QZoomChartView.h b/src/QZoomChartView.h index d7179c8..aa2ec0b 100644 --- a/src/QZoomChartView.h +++ b/src/QZoomChartView.h @@ -1,16 +1,15 @@ #pragma once +#include #include #include #include -using namespace QtCharts; - class QZoomChartView : public QChartView { public: QZoomChartView (QWidget* parent = 0); - QZoomChartView (QtCharts::QChart* chart, QWidget* parent = 0); + QZoomChartView (QChart* chart, QWidget* parent = 0); public slots: void printView (); diff --git a/src/SeerArrayVisualizerWidget.cpp b/src/SeerArrayVisualizerWidget.cpp index c23d116..34cbb40 100644 --- a/src/SeerArrayVisualizerWidget.cpp +++ b/src/SeerArrayVisualizerWidget.cpp @@ -11,7 +11,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -294,7 +295,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { //qDebug() << text; - if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { // 11^done,value="1" // 11^done,value="0x7fffffffd538" @@ -355,7 +356,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { setBVariableAddress(address); } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,memory="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,memory="))) { // 3^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613e71",contents="00"}] // 4^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613ed4",contents="000000000000000000000000"}] @@ -456,7 +457,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) { } } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { // 12^error,msg="No symbol \"return\" in current context." // 13^error,msg="No symbol \"cout\" in current context." diff --git a/src/SeerAsmWidget.cpp b/src/SeerAsmWidget.cpp index 1826fb2..8f20d11 100644 --- a/src/SeerAsmWidget.cpp +++ b/src/SeerAsmWidget.cpp @@ -73,9 +73,9 @@ void SeerAsmWidget::setData (const QString& data) { QString opcodes_text = Seer::parseFirst(asm_text, "opcodes=", '"', '"', false); QString inst_text = Seer::parseFirst(asm_text, "inst=", '"', '"', false); - address_width = std::max(address_width,address_text.length()); - opcode_width = std::max(opcode_width, opcodes_text.length()); - inst_width = std::max(inst_width, inst_text.length()); + address_width = std::max((qsizetype)address_width, address_text.length()); + opcode_width = std::max((qsizetype)opcode_width, opcodes_text.length()); + inst_width = std::max((qsizetype)inst_width, inst_text.length()); } // Write header. diff --git a/src/SeerDirectoryFilterProxyModel.h b/src/SeerDirectoryFilterProxyModel.h index c0ed8d4..be91036 100644 --- a/src/SeerDirectoryFilterProxyModel.h +++ b/src/SeerDirectoryFilterProxyModel.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/SeerEditorManagerWidget.cpp b/src/SeerEditorManagerWidget.cpp index f8de7b5..89fe536 100644 --- a/src/SeerEditorManagerWidget.cpp +++ b/src/SeerEditorManagerWidget.cpp @@ -616,7 +616,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { b++; } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { // 10^done,value="1" // 11^done,value="0x7fffffffd538" @@ -634,7 +634,7 @@ void SeerEditorManagerWidget::handleText (const QString& text) { assemblyWidget->handleText(text); } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { // 12^error,msg="No symbol \"return\" in current context." // 13^error,msg="No symbol \"cout\" in current context." diff --git a/src/SeerEditorWidgetAssembly.cpp b/src/SeerEditorWidgetAssembly.cpp index 363f0d9..a3dbe33 100644 --- a/src/SeerEditorWidgetAssembly.cpp +++ b/src/SeerEditorWidgetAssembly.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -231,7 +231,7 @@ void SeerEditorWidgetAssembly::handleText (const QString& text) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { QString id_text = text.section('^', 0,0); QString value_text = Seer::parseFirst(text, "value=", '"', '"', false); @@ -251,7 +251,7 @@ void SeerEditorWidgetAssembly::handleText (const QString& text) { return; } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { QString id_text = text.section('^', 0,0); QString msg_text = Seer::parseFirst(text, "value=", '"', '"', false); diff --git a/src/SeerEditorWidgetAssembly.h b/src/SeerEditorWidgetAssembly.h index d6fe92e..a346d4f 100644 --- a/src/SeerEditorWidgetAssembly.h +++ b/src/SeerEditorWidgetAssembly.h @@ -3,7 +3,7 @@ #include "SeerCppSourceHighlighter.h" #include "SeerKeySettings.h" #include "SeerPlainTextEdit.h" -#include +#include #include #include #include @@ -82,7 +82,7 @@ class SeerEditorWidgetAssemblyArea : public SeerPlainTextEdit { void showContextMenu (QMouseEvent* event); void showContextMenu (QContextMenuEvent* event); - void showContextMenu (const QPoint& pos, const QPoint& globalPos); + void showContextMenu (const QPoint& pos, const QPointF& globalPos); void setQuickBreakpoint (QMouseEvent* event); void setHighlighterSettings (const SeerHighlighterSettings& settings); diff --git a/src/SeerEditorWidgetAssemblyAreas.cpp b/src/SeerEditorWidgetAssemblyAreas.cpp index fb2024b..8b90e4f 100644 --- a/src/SeerEditorWidgetAssemblyAreas.cpp +++ b/src/SeerEditorWidgetAssemblyAreas.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include // @@ -590,7 +590,7 @@ void SeerEditorWidgetAssemblyArea::lineNumberAreaPaintEvent (QPaintEvent* event) QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -633,7 +633,7 @@ void SeerEditorWidgetAssemblyArea::offsetAreaPaintEvent (QPaintEvent* event) { QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -676,7 +676,7 @@ void SeerEditorWidgetAssemblyArea::breakPointAreaPaintEvent (QPaintEvent* event) QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -744,7 +744,7 @@ void SeerEditorWidgetAssemblyArea::opcodeAreaPaintEvent (QPaintEvent* event) { QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -1244,7 +1244,7 @@ bool SeerEditorWidgetAssemblyArea::breakpointAddressEnabled (const QString& addr void SeerEditorWidgetAssemblyArea::showContextMenu (QMouseEvent* event) { - showContextMenu(event->pos(), event->globalPos()); + showContextMenu(event->pos(), event->globalPosition()); } void SeerEditorWidgetAssemblyArea::showContextMenu (QContextMenuEvent* event) { @@ -1252,7 +1252,7 @@ void SeerEditorWidgetAssemblyArea::showContextMenu (QContextMenuEvent* event) { showContextMenu(event->pos(), event->globalPos()); } -void SeerEditorWidgetAssemblyArea::showContextMenu (const QPoint& pos, const QPoint& globalPos) { +void SeerEditorWidgetAssemblyArea::showContextMenu (const QPoint& pos, const QPointF& globalPos) { // Get the line number for the cursor position. QTextCursor cursor = cursorForPosition(pos); @@ -1338,7 +1338,7 @@ void SeerEditorWidgetAssemblyArea::showContextMenu (const QPoint& pos, const QPo } // Launch the menu. Get the response. - QAction* action = menu.exec(globalPos); + QAction* action = menu.exec(globalPos.toPoint()); // Do nothing. if (action == 0) { diff --git a/src/SeerEditorWidgetSource.cpp b/src/SeerEditorWidgetSource.cpp index c5de9fe..1b2934b 100644 --- a/src/SeerEditorWidgetSource.cpp +++ b/src/SeerEditorWidgetSource.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/SeerEditorWidgetSource.h b/src/SeerEditorWidgetSource.h index 59a5351..3b2f6c0 100644 --- a/src/SeerEditorWidgetSource.h +++ b/src/SeerEditorWidgetSource.h @@ -3,7 +3,7 @@ #include "SeerCppSourceHighlighter.h" #include "SeerKeySettings.h" #include "SeerPlainTextEdit.h" -#include +#include #include #include #include @@ -77,7 +77,7 @@ class SeerEditorWidgetSourceArea : public SeerPlainTextEdit { void showContextMenu (QMouseEvent* event); void showContextMenu (QContextMenuEvent* event); - void showContextMenu (const QPoint& pos, const QPoint& globalPos); + void showContextMenu (const QPoint& pos, const QPointF& globalPos); void setQuickBreakpoint (QMouseEvent* event); void clearExpression (); diff --git a/src/SeerEditorWidgetSourceAreas.cpp b/src/SeerEditorWidgetSourceAreas.cpp index c7f964a..54c5df4 100644 --- a/src/SeerEditorWidgetSourceAreas.cpp +++ b/src/SeerEditorWidgetSourceAreas.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include SeerEditorWidgetSourceArea::SeerEditorWidgetSourceArea(QWidget* parent) : SeerPlainTextEdit(parent) { @@ -228,7 +228,7 @@ void SeerEditorWidgetSourceArea::lineNumberAreaPaintEvent (QPaintEvent* event) { QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -265,7 +265,7 @@ void SeerEditorWidgetSourceArea::breakPointAreaPaintEvent (QPaintEvent* event) { QFont font = painter.font(); font.setItalic(format.fontItalic()); - font.setWeight(format.fontWeight()); + font.setWeight(QFont::Weight(format.fontWeight())); painter.setFont(font); QTextBlock block = firstVisibleBlock(); @@ -481,7 +481,7 @@ void SeerEditorWidgetSourceArea::mouseReleaseEvent (QMouseEvent* event) { }else if (modifiers == Qt::ShiftModifier) { _selectedExpressionName = QString("&") + textCursor().selectedText(); - }else if (modifiers == (Qt::ShiftModifier + Qt::ControlModifier)) { + }else if (modifiers == (Qt::ShiftModifier | Qt::ControlModifier)) { _selectedExpressionName = QString("*&") + textCursor().selectedText(); }else{ @@ -647,7 +647,7 @@ void SeerEditorWidgetSourceArea::openText (const QString& text, const QString& f delete _sourceHighlighter; _sourceHighlighter = 0; } - QRegExp cpp_re("(?:" + _sourceHighlighterSettings.sourceSuffixes() + ")$"); + QRegularExpression cpp_re("(?:" + _sourceHighlighterSettings.sourceSuffixes() + ")$"); if (file.contains(cpp_re)) { _sourceHighlighter = new SeerCppSourceHighlighter(0); @@ -955,7 +955,7 @@ bool SeerEditorWidgetSourceArea::breakpointLineEnabled (int lineno) const { void SeerEditorWidgetSourceArea::showContextMenu (QMouseEvent* event) { - showContextMenu(event->pos(), event->globalPos()); + showContextMenu(event->pos(), event->globalPosition()); } void SeerEditorWidgetSourceArea::showContextMenu (QContextMenuEvent* event) { @@ -963,7 +963,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (QContextMenuEvent* event) { showContextMenu(event->pos(), event->globalPos()); } -void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoint& globalPos) { +void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPointF& globalPos) { // Get the line number for the cursor position. QTextCursor cursor = cursorForPosition(pos); @@ -1129,7 +1129,7 @@ void SeerEditorWidgetSourceArea::showContextMenu (const QPoint& pos, const QPoin } // Launch the menu. Get the response. - QAction* action = menu.exec(globalPos); + QAction* action = menu.exec(globalPos.toPoint()); // Do nothing. if (action == 0) { @@ -1611,7 +1611,7 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { // 10^done,value="1" // 11^done,value="0x7fffffffd538" @@ -1627,7 +1627,7 @@ void SeerEditorWidgetSourceArea::handleText (const QString& text) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { // 12^error,msg="No symbol \"return\" in current context." // 13^error,msg="No symbol \"cout\" in current context." diff --git a/src/SeerExecutableFilterProxyModel.h b/src/SeerExecutableFilterProxyModel.h index 1a9fd02..6b3b30e 100644 --- a/src/SeerExecutableFilterProxyModel.h +++ b/src/SeerExecutableFilterProxyModel.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/SeerGdbLogWidget.cpp b/src/SeerGdbLogWidget.cpp index d60bb05..4cbc969 100644 --- a/src/SeerGdbLogWidget.cpp +++ b/src/SeerGdbLogWidget.cpp @@ -1,7 +1,8 @@ #include "SeerGdbLogWidget.h" #include "SeerUtl.h" #include -#include +#include +#include #include SeerGdbLogWidget::SeerGdbLogWidget (QWidget* parent) : SeerLogWidget(parent) { @@ -156,7 +157,7 @@ void SeerGdbLogWidget::processText (const QString& text) { // // Breakpoint 2 at 0x403a40: file explorer.cpp, line 78. // - if (str.contains(QRegExp("^Breakpoint ([0-9]+) at (0[xX][0-9a-fA-F]+): file (.*\\,) (line) ([0-9]+)"))) { + if (str.contains(QRegularExpression("^Breakpoint ([0-9]+) at (0[xX][0-9a-fA-F]+): file (.*\\,) (line) ([0-9]+)"))) { emit refreshBreakpointsList(); } } diff --git a/src/SeerHexWidget.cpp b/src/SeerHexWidget.cpp index c2910a1..9d9565b 100644 --- a/src/SeerHexWidget.cpp +++ b/src/SeerHexWidget.cpp @@ -521,7 +521,8 @@ void SeerHexWidget::handleByteOffsetChanged (int byte) { unsigned char ch = Seer::ucharToAscii( arr[i] ); - val += QString(ch); + QChar symbol = QChar(ch); + val += QString(symbol); } }else if (charMode() == SeerHexWidget::EbcdicCharMode) { @@ -529,7 +530,8 @@ void SeerHexWidget::handleByteOffsetChanged (int byte) { unsigned char ch = Seer::ebcdicToAscii( arr[i] ); - val += QString(ch); + QChar symbol = QChar(ch); + val += QString(symbol); } }else{ @@ -648,7 +650,8 @@ void SeerHexWidget::create () { unsigned char ch = Seer::ucharToAscii( data[b] ); - QString val(ch); + QChar symbol = QChar(ch); + QString val(symbol); // Write display character to document. cursor.insertText (val, defaultFormat); @@ -659,7 +662,8 @@ void SeerHexWidget::create () { unsigned char ch = Seer::ebcdicToAscii( data[b] ); - QString val(ch); + QChar symbol = QChar(ch); + QString val(symbol); // Write display character to document. cursor.insertText (val, defaultFormat); diff --git a/src/SeerImageVisualizerWidget.cpp b/src/SeerImageVisualizerWidget.cpp index cc3d44a..041e88b 100644 --- a/src/SeerImageVisualizerWidget.cpp +++ b/src/SeerImageVisualizerWidget.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -131,7 +131,7 @@ void SeerImageVisualizerWidget::handleText (const QString& text) { //qDebug() << text; - if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { // 10^done,value="1" // 11^done,value="0x7fffffffd538" @@ -149,7 +149,7 @@ void SeerImageVisualizerWidget::handleText (const QString& text) { setVariableAddress(words.first()); } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,memory="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,memory="))) { // 3^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613e71",contents="00"}] // 4^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613ed4",contents="000000000000000000000000"}] @@ -186,7 +186,7 @@ void SeerImageVisualizerWidget::handleText (const QString& text) { } } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { // 12^error,msg="No symbol \"return\" in current context." // 13^error,msg="No symbol \"cout\" in current context." diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index c5439b4..3368844 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -13,7 +13,8 @@ #include #include #include -#include +#include +#include #include #include @@ -863,16 +864,16 @@ void SeerMainWindow::handleText (const QString& text) { }else if (text.startsWith("^done,ada-exceptions={") && text.endsWith("}")) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done"))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done"))) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { return; - }else if (text.contains(QRegExp("^([0-9]+)\\^done,memory="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,memory="))) { return; }else if (text == "^exit") { diff --git a/src/SeerMainWindow.h b/src/SeerMainWindow.h index 63f2f0e..68b6aa2 100644 --- a/src/SeerMainWindow.h +++ b/src/SeerMainWindow.h @@ -5,8 +5,8 @@ #include "SeerKeySettings.h" #include "SeerProgressIndicator.h" #include -#include -#include +#include +#include #include #include #include diff --git a/src/SeerMemoryVisualizerWidget.cpp b/src/SeerMemoryVisualizerWidget.cpp index 344a1e8..87a600d 100644 --- a/src/SeerMemoryVisualizerWidget.cpp +++ b/src/SeerMemoryVisualizerWidget.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -26,7 +26,7 @@ SeerMemoryVisualizerWidget::SeerMemoryVisualizerWidget (QWidget* parent) : QWidg setWindowTitle("Seer Memory Visualizer"); setAttribute(Qt::WA_DeleteOnClose); - memoryLengthLineEdit->setValidator(new QRegExpValidator(QRegExp("\\s*([1-9]\\d*\\s*)+"), this)); + memoryLengthLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("\\s*([1-9]\\d*\\s*)+"), this)); columnCountSpinBox->setValue(memoryHexEditor->bytesPerLine()); if (memoryHexEditor->memoryMode() == SeerHexWidget::HexMemoryMode) { @@ -148,7 +148,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { //qDebug() << text; - if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { // 11^done,value="1" // 11^done,value="0x7fffffffd538" @@ -182,7 +182,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { setVariableAddress(address); } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,memory="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,memory="))) { // 3^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613e71",contents="00"}] // 4^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613ed4",contents="000000000000000000000000"}] @@ -219,7 +219,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { } } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,asm_insns="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,asm_insns="))) { QString id_text = text.section('^', 0,0); @@ -228,7 +228,7 @@ void SeerMemoryVisualizerWidget::handleText (const QString& text) { memoryAsmEditor->setData(text); } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { // 12^error,msg="No symbol \"return\" in current context." // 13^error,msg="No symbol \"cout\" in current context." diff --git a/src/SeerPrintpointCreateDialog.cpp b/src/SeerPrintpointCreateDialog.cpp index 027e49f..3f129f4 100644 --- a/src/SeerPrintpointCreateDialog.cpp +++ b/src/SeerPrintpointCreateDialog.cpp @@ -219,7 +219,7 @@ QString SeerPrintpointCreateDialog::printpointText () const { printpointParameters += " "; #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) - if (format().front() != "\"") { + if (format().front() != QString("\"")) { #else if (format().at(0) != "\"") { #endif @@ -229,7 +229,7 @@ QString SeerPrintpointCreateDialog::printpointText () const { printpointParameters += format(); #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) - if (format().back() != "\"") { + if (format().back() != QString("\"")) { #else if (format().at(format().size() - 1) != "\"") { #endif diff --git a/src/SeerProgressIndicator.cpp b/src/SeerProgressIndicator.cpp index 313286c..e857da1 100644 --- a/src/SeerProgressIndicator.cpp +++ b/src/SeerProgressIndicator.cpp @@ -1,6 +1,6 @@ #include "SeerProgressIndicator.h" #include -#include +#include #include #include #include diff --git a/src/SeerSeerLogWidget.cpp b/src/SeerSeerLogWidget.cpp index d98d339..2ca5321 100644 --- a/src/SeerSeerLogWidget.cpp +++ b/src/SeerSeerLogWidget.cpp @@ -1,7 +1,7 @@ #include "SeerSeerLogWidget.h" #include "SeerUtl.h" #include -#include +#include #include SeerSeerLogWidget::SeerSeerLogWidget (QWidget* parent) : SeerLogWidget(parent) { @@ -39,15 +39,15 @@ void SeerSeerLogWidget::processText (const QString& text) { selected = true; } - if (selected == false && text.contains(QRegExp("^([0-9]+)\\^")) == true) { + if (selected == false && text.contains(QRegularExpression("^([0-9]+)\\^")) == true) { selected = true; } - if (selected == false && text.contains(QRegExp("^([0-9]+)\\*")) == true) { + if (selected == false && text.contains(QRegularExpression("^([0-9]+)\\*")) == true) { selected = true; } - if (selected == false && text.contains(QRegExp("^([0-9]+)\\=")) == true) { + if (selected == false && text.contains(QRegularExpression("^([0-9]+)\\=")) == true) { selected = true; } diff --git a/src/SeerStackArgumentsBrowserWidget.cpp b/src/SeerStackArgumentsBrowserWidget.cpp index 1635e51..d63135f 100644 --- a/src/SeerStackArgumentsBrowserWidget.cpp +++ b/src/SeerStackArgumentsBrowserWidget.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include SeerStackArgumentsBrowserWidget::SeerStackArgumentsBrowserWidget (QWidget* parent) : QWidget(parent) { diff --git a/src/SeerStackLocalsBrowserWidget.cpp b/src/SeerStackLocalsBrowserWidget.cpp index b21e2b2..94ce83f 100644 --- a/src/SeerStackLocalsBrowserWidget.cpp +++ b/src/SeerStackLocalsBrowserWidget.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include SeerStackLocalsBrowserWidget::SeerStackLocalsBrowserWidget (QWidget* parent) : QWidget(parent) { diff --git a/src/SeerStructVisualizerWidget.cpp b/src/SeerStructVisualizerWidget.cpp index fb334e6..fbb1fd9 100644 --- a/src/SeerStructVisualizerWidget.cpp +++ b/src/SeerStructVisualizerWidget.cpp @@ -4,9 +4,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -85,7 +85,7 @@ void SeerStructVisualizerWidget::handleText (const QString& text) { QApplication::setOverrideCursor(Qt::BusyCursor); - if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { QString id_text = text.section('^', 0,0); QString value_text = Seer::parseFirst(text, "value=", '"', '"', false); @@ -108,7 +108,7 @@ void SeerStructVisualizerWidget::handleText (const QString& text) { } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { QString id_text = text.section('^', 0,0); QString msg_text = Seer::parseFirst(text, "msg=", '"', '"', false); diff --git a/src/SeerUtl.cpp b/src/SeerUtl.cpp index 2ddce46..71e4b5c 100644 --- a/src/SeerUtl.cpp +++ b/src/SeerUtl.cpp @@ -2,8 +2,9 @@ #include #include #include -#include +#include #include +#include // // Increment this with every release on GitHub. @@ -466,7 +467,9 @@ namespace Seer { bool matches (const QStringList& regexpatterns, const QString& string, QRegExp::PatternSyntax syntax) { foreach (const auto& regex, regexpatterns) { - if (string.contains(QRegExp(regex, Qt::CaseSensitive, syntax))) { + QRegExp regexPattern(regex, Qt::CaseSensitive, syntax); + QRegularExpression qt6Regex(regexPattern.pattern(), QRegularExpression::NoPatternOption ); + if (string.contains(qt6Regex)) { return true; } } diff --git a/src/SeerUtl.h b/src/SeerUtl.h index 74303ad..4e8d284 100644 --- a/src/SeerUtl.h +++ b/src/SeerUtl.h @@ -2,7 +2,7 @@ #include "QStringPair.h" #include #include -#include +#include namespace Seer { diff --git a/src/SeerVarVisualizerWidget.cpp b/src/SeerVarVisualizerWidget.cpp index 384b4e7..4463bb8 100644 --- a/src/SeerVarVisualizerWidget.cpp +++ b/src/SeerVarVisualizerWidget.cpp @@ -5,10 +5,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -145,7 +145,7 @@ QString SeerVarVisualizerWidget::variableName () const { void SeerVarVisualizerWidget::handleText (const QString& text) { - if (text.contains(QRegExp("^([0-9]+)\\^done,name="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,name="))) { // // "-var-create x2112 "*" me" @@ -223,7 +223,7 @@ void SeerVarVisualizerWidget::handleText (const QString& text) { } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,numchild="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,numchild="))) { // // "-var-list-children --all-values x2112.public" @@ -337,7 +337,7 @@ void SeerVarVisualizerWidget::handleText (const QString& text) { } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,changelist="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,changelist="))) { //qDebug() << "var-update-children" << text; @@ -415,7 +415,7 @@ void SeerVarVisualizerWidget::handleText (const QString& text) { } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,attr="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,attr="))) { //qDebug() << "var-show-attributes" << text; @@ -439,7 +439,7 @@ void SeerVarVisualizerWidget::handleText (const QString& text) { } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { QString id_text = text.section('^', 0,0); QString msg_text = Seer::parseFirst(text, "msg=", '"', '"', false); diff --git a/src/SeerVariableLoggerBrowserWidget.cpp b/src/SeerVariableLoggerBrowserWidget.cpp index 1a0d608..6bea138 100644 --- a/src/SeerVariableLoggerBrowserWidget.cpp +++ b/src/SeerVariableLoggerBrowserWidget.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -38,7 +38,7 @@ void SeerVariableLoggerBrowserWidget::handleText (const QString& text) { QApplication::setOverrideCursor(Qt::BusyCursor); - if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { //qDebug() << text; @@ -56,7 +56,7 @@ void SeerVariableLoggerBrowserWidget::handleText (const QString& text) { } } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { //qDebug() << text; diff --git a/src/SeerVariableTrackerBrowserWidget.cpp b/src/SeerVariableTrackerBrowserWidget.cpp index 710ae40..879ae4a 100644 --- a/src/SeerVariableTrackerBrowserWidget.cpp +++ b/src/SeerVariableTrackerBrowserWidget.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include @@ -122,7 +122,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { qDeleteAll(matches); } - }else if (text.contains(QRegExp("^([0-9]+)\\^done,value="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) { //qDebug() << text; @@ -137,7 +137,7 @@ void SeerVariableTrackerBrowserWidget::handleText (const QString& text) { matches.first()->setText(2, Seer::filterEscapes(value_text)); } - }else if (text.contains(QRegExp("^([0-9]+)\\^error,msg="))) { + }else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) { //qDebug() << text;