# HG changeset patch # User insilmaril # Date 1122490592 0 # Node ID 9079931da6c3cde9271b5bf944c283d62ae7e5d8 # Parent 88d2a027ef14f3f99bc4601b3e12bf3eb623af7c 1.7.2 fixed undo to select the right object before undoCommand diff -r 88d2a027ef14 -r 9079931da6c3 api.cpp --- a/api.cpp Mon Jul 25 20:35:01 2005 +0000 +++ b/api.cpp Wed Jul 27 18:56:32 2005 +0000 @@ -29,12 +29,39 @@ com=re.cap(1); // Get parameters + paramList.clear(); re.setPattern ("\\((.*)\\)"); pos=re.search (s); if (pos>=0) { QString s=re.cap(1); - paramList=QStringList::split(",",s); + QString a; + bool inquote=false; + pos=0; + if (!s.isEmpty()) + { + while (pos paramList.count()) { errorString =QString("Parameter index %1 is outside of parameter list").arg(index); - return false; + noErr=false; } else { paramList[index].toInt (&ok, 10); if (!ok) { errorString=QString("Parameter %1 is not an integer").arg(index); - return false; - } - return true; + noErr=false; + } else + noErr=true; } + return noErr; } int API::parInt (bool &ok,const uint &index)