diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-03-14 00:37:49 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-03-14 17:34:27 +0100 |
commit | 869f7d92e154f33fb30d60fd4558c289f4178e95 (patch) | |
tree | e9dce66bc8df7e726d96e37a3d6448ab27b4a66b | |
parent | 0ec802b1628ffdac91ec87714bf5aaf769ce213e (diff) | |
download | kdbg-869f7d92e154f33fb30d60fd4558c289f4178e95.tar.gz kdbg-869f7d92e154f33fb30d60fd4558c289f4178e95.zip |
Update the use of TQRegExp so that it does not require an old API.
The definition of -UTQT_NO_COMPAT is no longer needed.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 4b34cf6bede5edd2537783e64f61511c7e5df755)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | kdbg/gdbdriver.cpp | 4 | ||||
-rw-r--r-- | kdbg/xsldbgdriver.cpp | 13 |
3 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ebb510b..ce54f52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ include( ConfigureChecks.cmake ) ###### global compiler settings -add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST -UQT_NO_COMPAT ) +add_definitions( -DHAVE_CONFIG_H -UQT_NO_ASCII_CAST ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) diff --git a/kdbg/gdbdriver.cpp b/kdbg/gdbdriver.cpp index 933c191..068a4d9 100644 --- a/kdbg/gdbdriver.cpp +++ b/kdbg/gdbdriver.cpp @@ -358,9 +358,9 @@ void GdbDriver::parseMarker() // extract filename and line number static TQRegExp MarkerRE(":[0-9]+:[0-9]+:[begmidl]+:0x"); - int len; - int lineNoStart = MarkerRE.match(startMarker, 0, &len); + int lineNoStart = MarkerRE.search(startMarker, 0); if (lineNoStart >= 0) { + int len = MarkerRE.matchedLength(); int lineNo = atoi(startMarker + lineNoStart+1); // get address diff --git a/kdbg/xsldbgdriver.cpp b/kdbg/xsldbgdriver.cpp index 63b3227..9424d5e 100644 --- a/kdbg/xsldbgdriver.cpp +++ b/kdbg/xsldbgdriver.cpp @@ -294,7 +294,7 @@ XsldbgDriver::parseMarker() // TRACE("parseMarker : xsldbg"); // TRACE(m_output); - int len, markerStart = -1; + int len = 0, markerStart = -1; char *p = m_output; while (markerStart == -1) { @@ -303,13 +303,16 @@ XsldbgDriver::parseMarker() return; } //TRACE(TQString("parseMarker is looking at :") + p); - markerStart = m_markerRE.match(p, 0, &len); + markerStart = m_markerRE.search(p, 0); if (markerStart == -1) { // try to marker on next line ! p = strchr(p, '\n'); if ((p != 0) && (*p != '\0')) p++; } + else { + len = m_markerRE.matchedLength(); + } } @@ -327,7 +330,7 @@ XsldbgDriver::parseMarker() // extract filename and line number static TQRegExp MarkerRE(" at line [0-9]+"); - int lineNoStart = MarkerRE.match(startMarker, 0, &len); + int lineNoStart = MarkerRE.search(startMarker, 0); if (lineNoStart >= 0) { int lineNo = atoi(startMarker + lineNoStart + 8); @@ -1317,7 +1320,7 @@ XsldbgDriver::parseChangeExecutable(const char *output, TQString & message) * message (no debugging symbols found)... */ TQRegExp exp(".*Load of source deferred. Use the run command.*"); - int len, index = exp.match(output, 0, &len); + int index = exp.search(output, 0); if (index != -1) { TRACE("Parsed stylesheet executable"); @@ -1332,7 +1335,7 @@ XsldbgDriver::parseCoreFile(const char *output) TRACE("XsldbgDriver::parseCoreFile"); TRACE(output); TQRegExp exp(".*Load of data file deferred. Use the run command.*"); - int len, index = exp.match(output, 0, &len); + int index = exp.search(output, 0); if (index != -1) { m_haveCoreFile = true; |