summaryrefslogtreecommitdiffstats
path: root/languages/ruby/debugger/rdbparser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/ruby/debugger/rdbparser.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/ruby/debugger/rdbparser.cpp')
-rw-r--r--languages/ruby/debugger/rdbparser.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/languages/ruby/debugger/rdbparser.cpp b/languages/ruby/debugger/rdbparser.cpp
index c1cd7717..dc7e0226 100644
--- a/languages/ruby/debugger/rdbparser.cpp
+++ b/languages/ruby/debugger/rdbparser.cpp
@@ -34,15 +34,15 @@ namespace RDBDebugger
// **************************************************************************
-void RDBParser::parseVariables(LazyFetchItem *parent, char *buf)
+void RDBParser::parseVariables(LazyFetchItem *tqparent, char *buf)
{
static const char *unknown = "?";
- QString varName;
- QCString value;
+ TQString varName;
+ TQCString value;
int pos;
- Q_ASSERT(parent);
+ Q_ASSERT(tqparent);
if (buf == 0 || strlen(buf) == 0) {
return;
}
@@ -64,10 +64,10 @@ void RDBParser::parseVariables(LazyFetchItem *parent, char *buf)
while (pos != -1) {
varName = var_re.cap(1);
if (ref_re.search(var_re.cap(2)) != -1) {
- if (var_re.cap(2).contains("=") > 0) {
+ if (var_re.cap(2).tqcontains("=") > 0) {
value = (ref_re.cap(1) + ">").latin1();
} else {
- // There are no 'name=value' pairs, as in #<Qt::Color:0x0 #ff0000>
+ // There are no 'name=value' pairs, as in #<TQt::Color:0x0 #ff0000>
value = var_re.cap(2).latin1();
}
} else if (struct_re.search(var_re.cap(2)) != -1) {
@@ -84,7 +84,7 @@ void RDBParser::parseVariables(LazyFetchItem *parent, char *buf)
dataType = VALUE_TYPE;
}
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += var_re.matchedLength();
pos = var_re.search(buf, pos);
@@ -94,15 +94,15 @@ void RDBParser::parseVariables(LazyFetchItem *parent, char *buf)
}
}
-void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
+void RDBParser::parseExpandedVariable(VarItem *tqparent, char *buf)
{
DataType dataType;
int pos;
- QString varName;
- QCString value;
+ TQString varName;
+ TQCString value;
TQRegExp ppref_re("(#<([^:]|::)+:0x[\\da-f]+)([^\\n>]*)(>?)");
- switch (parent->dataType()) {
+ switch (tqparent->dataType()) {
case REFERENCE_TYPE:
{
// Look for a reference type which has been printed via a 'pp' command, to
@@ -128,10 +128,10 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
varName = ppvalue_re.cap(1);
if (ppref_re.search(ppvalue_re.cap(2)) != -1) {
- if (ppvalue_re.cap(2).contains("=") > 0) {
+ if (ppvalue_re.cap(2).tqcontains("=") > 0) {
value = (ppref_re.cap(1) + ">").latin1();
} else {
- // There are no 'name=value' pairs, as in #<Qt::Color:0x0 #ff0000>
+ // There are no 'name=value' pairs, as in #<TQt::Color:0x0 #ff0000>
value = ppvalue_re.cap(2).latin1();
}
} else {
@@ -139,7 +139,7 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
}
dataType = determineType((char *) ppvalue_re.cap(2).latin1());
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += ppvalue_re.matchedLength();
pos = ppvalue_re.search(buf, pos);
@@ -170,7 +170,7 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
}
DataType dataType = determineType((char *) pparray_re.cap(2).latin1());
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += pparray_re.matchedLength();
pos = pparray_re.search(buf, pos);
@@ -193,7 +193,7 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
varName = pphash_re.cap(1);
value = pphash_re.cap(2).latin1();
DataType dataType = determineType(value.data());
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += pphash_re.matchedLength();
pos = pphash_re.search(buf, pos);
@@ -235,7 +235,7 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
varName = ppvalue_re.cap(1);
value = ppvalue_re.cap(2).latin1();
dataType = determineType(value.data());
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += ppvalue_re.matchedLength();
pos = ppvalue_re.search(buf, pos);
@@ -259,7 +259,7 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
varName = ppstring_re.cap(1);
value = ppstring_re.cap(2).latin1();
DataType dataType = determineType(value.data());
- setItem(parent, varName, dataType, value);
+ setItem(tqparent, varName, dataType, value);
pos += ppstring_re.matchedLength();
pos = ppstring_re.search(buf, pos);
@@ -278,12 +278,12 @@ void RDBParser::parseExpandedVariable(VarItem *parent, char *buf)
// **************************************************************************
-void RDBParser::setItem(LazyFetchItem *parent, const TQString &varName,
+void RDBParser::setItem(LazyFetchItem *tqparent, const TQString &varName,
DataType dataType, const TQCString &value)
{
- VarItem *item = parent->findItem(varName);
+ VarItem *item = tqparent->findItem(varName);
if (item == 0) {
- item = new VarItem(parent, varName, dataType);
+ item = new VarItem(tqparent, varName, dataType);
} else {
// The dataType of an item can change, so update it
item->setDataType(dataType);
@@ -319,11 +319,11 @@ DataType RDBParser::determineType(char *buf)
TQRegExp hash_re("(Hash \\(\\d+ element\\(s\\)\\))");
TQRegExp string_re("(String \\(length \\d+\\))");
- if (qstrncmp(buf, "#<struct", strlen("#<struct")) == 0) {
+ if (tqstrncmp(buf, "#<struct", strlen("#<struct")) == 0) {
return STRUCT_TYPE;
- } else if (qstrncmp(buf, "#<Qt::Color:0x", strlen("#<Qt::Color:0x")) == 0) {
+ } else if (tqstrncmp(buf, "#<TQt::Color:0x", strlen("#<TQt::Color:0x")) == 0) {
return COLOR_TYPE;
- } else if (qstrncmp(buf, "#<", strlen("#<")) == 0 && strstr(buf, "=") != 0) {
+ } else if (tqstrncmp(buf, "#<", strlen("#<")) == 0 && strstr(buf, "=") != 0) {
// An object instance reference is only expandable and a 'REFERENCE_TYPE'
// if it contains an '=' (ie it has at least one '@instance_variable=value').
// Otherwise, treat it as a 'VALUE_TYPE'.
@@ -334,7 +334,7 @@ DataType RDBParser::determineType(char *buf)
return HASH_TYPE;
} else if (string_re.search(buf) != -1) {
return STRING_TYPE;
- } else if (qstrncmp(buf, "nil", strlen("nil")) == 0) {
+ } else if (tqstrncmp(buf, "nil", strlen("nil")) == 0) {
// return UNKNOWN_TYPE;
return VALUE_TYPE;
} else {