From 7f4e3a2439c9e9e9594908f42c94c03a89817f22 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 29 Apr 2019 15:52:53 -0400 Subject: [PATCH] 2019-04-29 Fred Gleason * Added code to normalize the case of group names in 'RDGroups::RDGroups()'. --- ChangeLog | 3 +++ lib/rdgroup.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index fd5c3623..ed7b4ad8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18617,3 +18617,6 @@ * Renamed the 'SchedCartList' class to 'RDSchedCartList' and refactored it to be idiomatic Qt. * Renamed the 'SchedRulesList' class to 'RDSchedRulesList'. +2019-04-29 Fred Gleason + * Added code to normalize the case of group names in + 'RDGroups::RDGroups()'. diff --git a/lib/rdgroup.cpp b/lib/rdgroup.cpp index 1b76c277..6af196da 100644 --- a/lib/rdgroup.cpp +++ b/lib/rdgroup.cpp @@ -45,6 +45,18 @@ RDGroup::RDGroup(QString name,bool create) q=new RDSqlQuery(sql); delete q; } + else { + // + // Normalize case + // + sql=QString("select NAME from GROUPS where ")+ + "NAME=\""+RDEscapeString(name)+"\""; + q=new RDSqlQuery(sql); + if(q->first()) { + group_name=q->value(0).toString(); + } + delete q; + } }