From: <hp...@us...> - 2003-02-15 23:27:08
|
Update of /cvsroot/tora/tora In directory sc8-pr-cvs1:/tmp/cvs-serv27597 Modified Files: NEWS todebug.cpp Log Message: Index: NEWS =================================================================== RCS file: /cvsroot/tora/tora/NEWS,v retrieving revision 1.827 retrieving revision 1.828 diff -C2 -d -r1.827 -r1.828 *** NEWS 15 Feb 2003 22:31:55 -0000 1.827 --- NEWS 15 Feb 2003 23:27:04 -0000 1.828 *************** *** 1,4 **** --- 1,5 ---- 1.3.10: + 2003-02-15: Use SQL parse in parts of the debugger. 2003-02-15: Fixed SIGSEGV problem in listviews. 2003-02-15: Fixed twirl not showing initially... again. Index: todebug.cpp =================================================================== RCS file: /cvsroot/tora/tora/todebug.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** todebug.cpp 3 Feb 2003 22:12:43 -0000 1.100 --- todebug.cpp 15 Feb 2003 23:27:04 -0000 1.101 *************** *** 2095,2130 **** bool ret=true; if (!str.isEmpty()) { - bool inWord=false; - int curWord=0; - QString words[10]; bool body=false; - int begin[10]; ! for (unsigned int i=0;i<str.length();i++) { ! if (str.at(i).isSpace()) { ! if (inWord) { ! curWord++; ! if (curWord>=10) ! break; ! inWord=false; ! } ! } else { ! if (!inWord) { ! begin[curWord]=i; ! inWord=true; ! } ! words[curWord]+=str.at(i); ! } ! } ! int word=0; ! if (words[word].upper()==QString::fromLatin1("CREATE")) { ! word++; ! if (words[word].upper()==QString::fromLatin1("OR")&& ! words[word+1].upper()==QString::fromLatin1("REPLACE")) ! word+=2; } ! QString type=words[word].upper(); if (type!=QString::fromLatin1("PROCEDURE")&& type!=QString::fromLatin1("TYPE")&& --- 2095,2114 ---- bool ret=true; if (!str.isEmpty()) { bool body=false; ! toSQLParse::stringTokenizer tokens(str); ! QString token=tokens.getToken(); ! ! if (token.upper()=="CREATE") { ! token=tokens.getToken(); ! if (token.upper()=="OR") { ! token=tokens.getToken(); ! if (token.upper()=="REPLACE") ! token=tokens.getToken(); ! } } ! QString type=token.upper(); if (type!=QString::fromLatin1("PROCEDURE")&& type!=QString::fromLatin1("TYPE")&& *************** *** 2134,2168 **** return false; } - word++; ! if (words[word].upper()==QString::fromLatin1("BODY")) { body=true; ! word++; ! } ! QString what=words[word]; ! word++; ! if(!what.contains('.')&&words[word][0]=='.') { ! what+=words[word]; ! word++; ! } ! if (what.right(1)==QString::fromLatin1(".")) { ! what+=words[word]; ! word++; ! } ! if (word>=curWord) { ! toStatusMessage(tr("Invalid start of code")); ! return false; } ! QString schema; ! QString object; ! ! int pos=what.find('.'); ! if (pos==-1) { ! schema=Schema; ! object=what; ! } else { ! schema=what.left(pos); ! object=what.right(what.length()-pos-1); } --- 2118,2136 ---- return false; } ! token=tokens.getToken(); ! if (token.upper()=="BODY") { body=true; ! token=tokens.getToken(); } + QString object=token; + QString schema=Schema; ! int offset=tokens.offset(); ! token=tokens.getToken(); ! if (token==".") { ! schema=object; ! object=tokens.getToken(); ! offset=tokens.offset(); } *************** *** 2177,2181 **** sql.append(object); sql.append(QString::fromLatin1(" ")); ! sql.append(str.right(str.length()-begin[word])); try { --- 2145,2149 ---- sql.append(object); sql.append(QString::fromLatin1(" ")); ! sql.append(str.mid(offset)); try { |