From: <hp...@us...> - 2003-07-22 12:10:00
|
Update of /cvsroot/tora/tora In directory sc8-pr-cvs1:/tmp/cvs-serv7683 Modified Files: NEWS todebug.cpp tomain.cpp tomarkedtext.cpp Log Message: Index: NEWS =================================================================== RCS file: /cvsroot/tora/tora/NEWS,v retrieving revision 1.855 retrieving revision 1.856 diff -C2 -d -r1.855 -r1.856 *** NEWS 22 Jul 2003 01:51:06 -0000 1.855 --- NEWS 22 Jul 2003 12:09:57 -0000 1.856 *************** *** 1,4 **** --- 1,8 ---- 1.3.10: + 2003-07-22: Added new autodetect functionality of watches in debugger. + 2003-07-22: Made problems in debugger be visible in more places than the log. + 2003-07-22: Update log even if something went wrong. (Especially the log) + 2003-07-22: Save edited state of editors. 2003-07-22: Separated GUI and handler of chart manager. (Should hopefully fix some focusing problems) 2003-07-22: Added 1 parse, 1 execute selection of SGA Trace tool. Index: todebug.cpp =================================================================== RCS file: /cvsroot/tora/tora/todebug.cpp,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** todebug.cpp 21 Jul 2003 23:31:41 -0000 1.105 --- todebug.cpp 22 Jul 2003 12:09:57 -0000 1.106 *************** *** 157,183 **** static toDebugTool DebugTool; - QListViewItem *toDebugWatch::findMisc(const QString &str,QListViewItem *item) - { - if (item) { - while(item&&item->text(0)!=str) { - item=item->nextSibling(); - } - if (item) { - item=item->firstChild(); - while(item&&item->text(0)!="Misc") { - item=item->nextSibling(); - } - if (item) - item=item->firstChild(); - } - } - return item; - } - toDebugWatch::toDebugWatch(toDebug *parent) : toDebugWatchUI(parent,"AddWatch",true),Debugger(parent) { toHelp::connectDialog(this); - QListViewItem *items=Debugger->contents(); { int curline,curcol; --- 157,164 ---- *************** *** 194,211 **** Default=Default.left(curcol); } - QString type=Debugger->headEditor()->type(); - if (type.left(7)==QString::fromLatin1("PACKAGE")||type.left(4)==QString::fromLatin1("TYPE")) - HeadItems=findMisc(qApp->translate("toDebug","Head"),items); - else { - HeadScope->setEnabled(false); - HeadItems=NULL; - } - type=Debugger->bodyEditor()->type(); - if (type.left(7)==QString::fromLatin1("PACKAGE")||type.left(4)==QString::fromLatin1("TYPE")) - BodyItems=findMisc(qApp->translate("toDebug","Body"),items); - else { - BodyScope->setEnabled(false); - BodyItems=NULL; - } Object=Debugger->currentEditor()->object(); --- 175,178 ---- *************** *** 218,239 **** { switch(num) { ! case 1: Name->clear(); Name->insertItem(Default); break; - case 2: - Name->clear(); - { - for (QListViewItem *item=HeadItems;item;item=item->nextSibling()) - Name->insertItem(item->text(0)); - } - break; - case 3: - Name->clear(); - { - for (QListViewItem *item=BodyItems;item;item=item->nextSibling()) - Name->insertItem(item->text(0)); - } - break; case 4: { --- 185,192 ---- { switch(num) { ! default: Name->clear(); Name->insertItem(Default); break; case 4: { *************** *** 257,260 **** --- 210,214 ---- switch(Scope->id(Scope->selected())) { case 1: + case 5: { toResultViewItem *item=new toResultViewItem(watches,NULL); *************** *** 264,267 **** --- 218,222 ---- item->setText(3,QString::null); item->setText(4,QString::fromLatin1("NOCHANGE")); + item->setText(6,Scope->id(Scope->selected())==5?"AUTO":""); return item; } *************** *** 491,494 **** --- 446,450 ---- Parent.TargetLog+=QString::fromLatin1("Encountered error: "); Parent.TargetLog+=str; + Parent.TargetException+=str; Parent.TargetLog+=QString::fromLatin1("\n"); Parent.Lock.unlock(); *************** *** 496,499 **** --- 452,456 ---- Parent.Lock.lock(); Parent.TargetLog+=QString::fromLatin1("Encountered unknown exception\n"); + Parent.TargetException+=QString::fromLatin1("Encountered unknown exception\n"); Parent.Lock.unlock(); } *************** *** 607,623 **** if (parent->text(0)==curName) { for (parent=parent->firstChild();parent;parent=parent->nextSibling()) { ! for (QListViewItem *item=parent->firstChild();item;item=item->nextSibling()) { ! toContentsItem *cont=dynamic_cast<toContentsItem *>(item); ! if (cont) { ! QString type=cont->parent()->text(0); ! if (cont->Line>curline) ! break; ! if (cont->Line>line) { ! line=cont->Line; ! if (type==QString::fromLatin1("Procedure")||type==QString::fromLatin1("Function")) ! valid=true; ! else ! valid=false; ! } } } --- 564,578 ---- if (parent->text(0)==curName) { for (parent=parent->firstChild();parent;parent=parent->nextSibling()) { ! toContentsItem *cont=dynamic_cast<toContentsItem *>(parent); ! if (cont) { ! QString type=cont->text(0); ! if (cont->Line>curline) ! break; ! if (cont->Line>line) { ! line=cont->Line; ! if (type.startsWith("Procedure ")||type.startsWith("Function ")) ! valid=true; ! else ! valid=false; } } *************** *** 925,931 **** std::list<toSQLParse::statement>::iterator i=statements.subTokens().begin(); ! for(i++;i!=statements.subTokens().end();i++) { if ((*i).Type==toSQLParse::statement::Block||(*i).Type==toSQLParse::statement::Statement) updateContent(*i,item); } } --- 880,889 ---- std::list<toSQLParse::statement>::iterator i=statements.subTokens().begin(); ! if (i!=statements.subTokens().end()) ! i++; ! while(i!=statements.subTokens().end()) { if ((*i).Type==toSQLParse::statement::Block||(*i).Type==toSQLParse::statement::Statement) updateContent(*i,item); + i++; } } *************** *** 960,965 **** parent->setOpen(true); ! for(std::list<toSQLParse::statement>::iterator i=statements.begin();i!=statements.end();i++) ! updateContent(*i,parent); if (!parent->firstChild()) --- 918,930 ---- parent->setOpen(true); ! for(std::list<toSQLParse::statement>::iterator i=statements.begin();i!=statements.end();i++) { ! std::list<toSQLParse::statement>::iterator j=(*i).subTokens().begin(); ! if (j!=(*i).subTokens().end()) ! j++; ! while(j!=(*i).subTokens().end()) { ! updateContent(*j,parent); ! j++; ! } ! } if (!parent->firstChild()) *************** *** 976,979 **** --- 941,948 ---- TargetLog=QString::null; } + if (!TargetException.isEmpty()) { + toStatusMessage(TargetException); + TargetException=QString::null; + } } *************** *** 1203,1216 **** int space = 0; QString value; ! if (item->text(0).isEmpty()) { toQuery query(connection(),SQLLocalWatch,item->text(2)); ret=query.readValue().toInt(); value=query.readValue(); } else { toQuery query(connection(),SQLGlobalWatch, ! item->text(1),item->text(0),item->text(2)); ret=query.readValue().toInt(); value=query.readValue(); space=query.readValue().toInt(); } item->setText(4,QString::null); --- 1172,1212 ---- int space = 0; QString value; ! bool local=false; ! QString object; ! QString schema; ! if (!item->text(6).isEmpty()) { ! local=true; ! toQuery query(connection(),SQLLocalWatch,item->text(2)); ! ret=query.readValue().toInt(); ! value=query.readValue(); ! if (ret!=TO_SUCCESS&& ! ret!=TO_ERROR_NULLVALUE&& ! ret!=TO_ERROR_INDEX_TABLE&& ! ret!=TO_ERROR_NULLCOLLECTION) { ! object=currentEditor()->object(); ! schema=currentEditor()->schema(); ! local=false; ! toQuery q2(connection(),SQLGlobalWatch, ! object, ! schema, ! item->text(2)); ! ret=q2.readValue().toInt(); ! value=q2.readValue(); ! space=q2.readValue().toInt(); ! } ! } else if (item->text(0).isEmpty()) { toQuery query(connection(),SQLLocalWatch,item->text(2)); ret=query.readValue().toInt(); value=query.readValue(); + local=true; } else { + object=item->text(1); + schema=item->text(0); toQuery query(connection(),SQLGlobalWatch, ! object,schema,item->text(2)); ret=query.readValue().toInt(); value=query.readValue(); space=query.readValue().toInt(); + local=false; } item->setText(4,QString::null); *************** *** 1227,1231 **** item->setText(5,QString::fromLatin1("LIST")); } else if (ret==TO_ERROR_INDEX_TABLE) { ! if (item->text(0).isEmpty()) { toQuery query(connection(),SQLLocalIndex,item->text(2)); value=query.readValue(); --- 1223,1227 ---- item->setText(5,QString::fromLatin1("LIST")); } else if (ret==TO_ERROR_INDEX_TABLE) { ! if (local) { toQuery query(connection(),SQLLocalIndex,item->text(2)); value=query.readValue(); *************** *** 1233,1238 **** toQList args; toPush(args,toQValue(space)); ! toPush(args,toQValue(item->text(1))); ! toPush(args,toQValue(item->text(0))); toPush(args,toQValue(item->text(2))); toQuery query(connection(),SQLGlobalIndex,args); --- 1229,1234 ---- toQList args; toPush(args,toQValue(space)); ! toPush(args,toQValue(object)); ! toPush(args,toQValue(schema)); toPush(args,toQValue(item->text(2))); toQuery query(connection(),SQLGlobalIndex,args); *************** *** 1252,1257 **** name+=QString::fromLatin1(")"); last=new toResultViewItem(item,last); ! last->setText(0,item->text(0)); ! last->setText(1,item->text(1)); last->setText(2,name); last->setText(3,QString::null); --- 1248,1253 ---- name+=QString::fromLatin1(")"); last=new toResultViewItem(item,last); ! last->setText(0,schema); ! last->setText(1,object); last->setText(2,name); last->setText(3,QString::null); *************** *** 1402,1410 **** } TOCATCH } else { - #if 0 - // I don't want this since it can happen when compiling etc. toStatusMessage(tr("No running target")); - #endif Lock.unlock(); } return -1; --- 1398,1404 ---- } TOCATCH } else { toStatusMessage(tr("No running target")); Lock.unlock(); + readLog(); } return -1; *************** *** 2438,2441 **** --- 2432,2436 ---- data[key+":Object"]=item->allText(1); data[key+":Item"]=item->allText(2); + data[key+":Auto"]=item->allText(6); } id++; *************** *** 2488,2491 **** --- 2483,2488 ---- item->setText(3,QString::fromLatin1("")); item->setText(4,QString::fromLatin1("NOCHANGE")); + if (!data[key+":Auto"].isEmpty()) + item->setText(6,"AUTO"); id++; } Index: tomain.cpp =================================================================== RCS file: /cvsroot/tora/tora/tomain.cpp,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** tomain.cpp 21 Jul 2003 20:27:39 -0000 1.166 --- tomain.cpp 22 Jul 2003 12:09:57 -0000 1.167 *************** *** 1550,1554 **** { #if QT_VERSION >= 300 ! if (data.size()>0) VersionString+=QCString(data.data(),data.size()); #endif --- 1550,1554 ---- { #if QT_VERSION >= 300 ! if (data.size()>0&&data.data()!=NULL) VersionString+=QCString(data.data(),data.size()); #endif Index: tomarkedtext.cpp =================================================================== RCS file: /cvsroot/tora/tora/tomarkedtext.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** tomarkedtext.cpp 8 Apr 2003 08:13:49 -0000 1.56 --- tomarkedtext.cpp 22 Jul 2003 12:09:57 -0000 1.57 *************** *** 438,441 **** --- 438,443 ---- data[prefix+":Column"]=QString::number(curcol); data[prefix+":Line"]=QString::number(curline); + if (edited()) + data[prefix+":Edited"]="Yes"; } *************** *** 447,450 **** --- 449,454 ---- Filename=data[prefix+":Filename"]; setCursorPosition(data[prefix+":Line"].toInt(),data[prefix+":Column"].toInt()); + if (data[prefix+":Edited"].isEmpty()) + setEdited(false); } |