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>
pull/4/head
Michele Calgaro 3 years ago committed by Slávek Banko
parent 49c43d74d8
commit 4b34cf6bed
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -62,7 +62,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings ###### global compiler settings
add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST -UTQT_NO_COMPAT ) add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )

@ -358,9 +358,9 @@ void GdbDriver::parseMarker()
// extract filename and line number // extract filename and line number
static TQRegExp MarkerRE(":[0-9]+:[0-9]+:[begmidl]+:0x"); static TQRegExp MarkerRE(":[0-9]+:[0-9]+:[begmidl]+:0x");
int len; int lineNoStart = MarkerRE.search(startMarker, 0);
int lineNoStart = MarkerRE.match(startMarker, 0, &len);
if (lineNoStart >= 0) { if (lineNoStart >= 0) {
int len = MarkerRE.matchedLength();
int lineNo = atoi(startMarker + lineNoStart+1); int lineNo = atoi(startMarker + lineNoStart+1);
// get address // get address

@ -294,7 +294,7 @@ XsldbgDriver::parseMarker()
// TRACE("parseMarker : xsldbg"); // TRACE("parseMarker : xsldbg");
// TRACE(m_output); // TRACE(m_output);
int len, markerStart = -1; int len = 0, markerStart = -1;
char *p = m_output; char *p = m_output;
while (markerStart == -1) { while (markerStart == -1) {
@ -303,13 +303,16 @@ XsldbgDriver::parseMarker()
return; return;
} }
//TRACE(TQString("parseMarker is looking at :") + p); //TRACE(TQString("parseMarker is looking at :") + p);
markerStart = m_markerRE.match(p, 0, &len); markerStart = m_markerRE.search(p, 0);
if (markerStart == -1) { if (markerStart == -1) {
// try to marker on next line ! // try to marker on next line !
p = strchr(p, '\n'); p = strchr(p, '\n');
if ((p != 0) && (*p != '\0')) if ((p != 0) && (*p != '\0'))
p++; p++;
} }
else {
len = m_markerRE.matchedLength();
}
} }
@ -327,7 +330,7 @@ XsldbgDriver::parseMarker()
// extract filename and line number // extract filename and line number
static TQRegExp MarkerRE(" at line [0-9]+"); static TQRegExp MarkerRE(" at line [0-9]+");
int lineNoStart = MarkerRE.match(startMarker, 0, &len); int lineNoStart = MarkerRE.search(startMarker, 0);
if (lineNoStart >= 0) { if (lineNoStart >= 0) {
int lineNo = atoi(startMarker + lineNoStart + 8); int lineNo = atoi(startMarker + lineNoStart + 8);
@ -1317,7 +1320,7 @@ XsldbgDriver::parseChangeExecutable(const char *output, TQString & message)
* message (no debugging symbols found)... * message (no debugging symbols found)...
*/ */
TQRegExp exp(".*Load of source deferred. Use the run command.*"); 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) { if (index != -1) {
TRACE("Parsed stylesheet executable"); TRACE("Parsed stylesheet executable");
@ -1332,7 +1335,7 @@ XsldbgDriver::parseCoreFile(const char *output)
TRACE("XsldbgDriver::parseCoreFile"); TRACE("XsldbgDriver::parseCoreFile");
TRACE(output); TRACE(output);
TQRegExp exp(".*Load of data file deferred. Use the run command.*"); 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) { if (index != -1) {
m_haveCoreFile = true; m_haveCoreFile = true;

Loading…
Cancel
Save