diff --git a/ChangeLog b/ChangeLog index 03021da5..c2973706 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23793,3 +23793,5 @@ attempting to create a log with a name that already existed. 2022-12-13 Fred Gleason * Purged vestigal code from rdlogedit(1). +2022-12-13 Fred Gleason + * Cleaned up filtering SQL in 'RDLogListModel'. diff --git a/lib/rdloglistmodel.cpp b/lib/rdloglistmodel.cpp index 7bd69f06..252f14eb 100644 --- a/lib/rdloglistmodel.cpp +++ b/lib/rdloglistmodel.cpp @@ -204,11 +204,10 @@ QModelIndex RDLogListModel::addLog(const QString &name) // // Make sure we match the current filter // - QString sql=QString("select ")+ - "`NAME` "+ // 00 - "from `LOGS` where "+ + QString sql=sqlFields()+"where "+ "`NAME`='"+RDEscapeString(name)+"' "+ d_filter_where_sql; + printf("ADD SQL: %s\n",sql.toUtf8().constData()); RDSqlQuery *q=new RDSqlQuery(sql); if(q->first()) { QList list;