Remove use of convenience library classes

This commit is contained in:
Patrick Linstruth 2018-11-15 15:52:30 -08:00
parent 612a63ef32
commit b5f736bd6e
2 changed files with 12 additions and 5 deletions

View File

@ -18007,9 +18007,7 @@
* Fixed a regression in rdpanel(1) background image.
2018-11-09 Fred Gleason <fredg@paravelsystems.com>
* Removed a debugging printf in rdpanel(1).
2018-11-13 Patrick Linstruth <patrick@deltecent.com>
2018-11-15 Patrick Linstruth <patrick@deltecent.com>
* Added a 'CART_SCHED_CODES' table to the database.
* Removed 'SCHED_CODES' field from 'CART'
* Incremented the database version to 299.
2018-11-13 Patrick Linstruth <patrick@deltecent.com>
* Scheduler optimization

View File

@ -9817,8 +9817,17 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg)
q=new RDSqlQuery("select NUMBER,SCHED_CODES from CART where TYPE=1",false);
while(q->next()) {
cart=new RDCart(q->value(0).toUInt());
cart->setSchedCodes(q->value(1).toString());
for(int i=0;i<255;i+=11) {
QString code=q->value(1).toString().mid(i,11).stripWhiteSpace();
if((!code.isEmpty())&&(code!=".")) {
sql=QString("insert into CART_SCHED_CODES set ")+
"CART_NUMBER="+q->value(0).toString()+","+
"SCHED_CODE=\""+code+"\"";
if(!RDSqlQuery::apply(sql,err_msg)) {
return false;
}
}
}
}
delete q;