mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-03 09:32:34 +02:00
2016-07-22 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'utils/rdclilogedit/operations.cpp' where attempting to load a log with mismatched case in the name would generate a SQL error.
This commit is contained in:
parent
f92e2ea142
commit
d4e2b65796
@ -15392,3 +15392,7 @@
|
||||
2016-07-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Renamed the '--script' option in rdclilogedit(1) to be '-n' or
|
||||
'--quiet' or '--silent'.
|
||||
2016-07-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'utils/rdclilogedit/operations.cpp' where attempting
|
||||
to load a log with mismatched case in the name would generate a SQL
|
||||
error.
|
||||
|
@ -158,8 +158,11 @@ void MainObject::Listservices() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Load(const QString &logname)
|
||||
void MainObject::Load(QString logname)
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
if(edit_log!=NULL) {
|
||||
delete edit_log;
|
||||
edit_log=NULL;
|
||||
@ -168,6 +171,21 @@ void MainObject::Load(const QString &logname)
|
||||
delete edit_log_event;
|
||||
edit_log_event=NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Normalize log name case
|
||||
//
|
||||
// FIXME: This should really be handled by use of collations in the
|
||||
// where clause.
|
||||
//
|
||||
sql=QString("select NAME from LOGS where ")+
|
||||
"NAME=\""+RDEscapeString(logname)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
logname=q->value(0).toString();
|
||||
}
|
||||
delete q;
|
||||
|
||||
edit_log=new RDLog(logname);
|
||||
if(edit_log->exists()) {
|
||||
edit_log_event=new RDLogEvent(RDLog::tableName(logname));
|
||||
|
@ -53,7 +53,7 @@ class MainObject : public QObject
|
||||
void List();
|
||||
void ListLogs() const;
|
||||
void Listservices() const;
|
||||
void Load(const QString &logname);
|
||||
void Load(QString logname);
|
||||
void New(const QString &logname);
|
||||
void Remove(int line);
|
||||
void Save();
|
||||
|
Loading…
x
Reference in New Issue
Block a user