2022-12-13 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in 'RDLibraryModel' that could throw a SQL
	error when processing notifications for added carts.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-12-13 13:35:42 -05:00
parent 88810a06f4
commit e0890f05bd
2 changed files with 7 additions and 4 deletions

View File

@@ -23784,4 +23784,7 @@
2022-12-08 Fred Gleason <fredg@paravelsystems.com> 2022-12-08 Fred Gleason <fredg@paravelsystems.com>
* Implemented column sorting for item lists in rdcastmanager(1). * Implemented column sorting for item lists in rdcastmanager(1).
2022-12-08 Fred Gleason <fredg@paravelsystems.com> 2022-12-08 Fred Gleason <fredg@paravelsystems.com>
* Incremented the package version to 4.0.0rc0int7. * Incremented the package version to 4.0.0rc0int7
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'RDLibraryModel' that could throw a SQL
error when processing notifications for added carts.

View File

@@ -573,15 +573,15 @@ void RDLibraryModel::setFilterSql(const QString &sql,int cart_limit)
void RDLibraryModel::processNotification(RDNotification *notify) void RDLibraryModel::processNotification(RDNotification *notify)
{ {
printf("RDLibraryModel::processNotification()\n");
QString sql; QString sql;
RDSqlQuery *q=NULL; RDSqlQuery *q=NULL;
if(notify->type()==RDNotification::CartType) { if(notify->type()==RDNotification::CartType) {
switch(notify->action()) { switch(notify->action()) {
case RDNotification::AddAction: case RDNotification::AddAction:
sql=QString("select ")+ sql=sqlFields()+
"`NUMBER` "+ // 00
"from `CART` "+
d_filter_sql+ d_filter_sql+
QString::asprintf(" && `CART`.`NUMBER`=%u",notify->id().toUInt()); QString::asprintf(" && `CART`.`NUMBER`=%u",notify->id().toUInt());
q=new RDSqlQuery(sql); q=new RDSqlQuery(sql);