mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-10 22:56:01 +01:00
2018-07-17 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up SQL quieries in 'rdlogedit/' ensure UTF-8 compatibility.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdlist_logs.h>
|
||||
|
||||
#include <edit_chain.h>
|
||||
@@ -220,35 +221,27 @@ QSizePolicy EditChain::sizePolicy() const
|
||||
|
||||
void EditChain::timeChangedData(const QTime &time)
|
||||
{
|
||||
QString str;
|
||||
|
||||
if(edit_timetype_box->isChecked()) {
|
||||
str=QString(tr("Transition If Previous Cart Ends Before"));
|
||||
edit_time_label->
|
||||
setText(QString().sprintf("%s %s:",(const char *)str,
|
||||
(const char *)edit_time_edit->time().
|
||||
toString("hh:mm:ss.zzz").left(10)));
|
||||
setText(tr("Transition If Previous Cart Ends Before")+" "+
|
||||
edit_time_edit->time().toString("hh:mm:ss.zzz").left(10)+":");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EditChain::timeToggledData(bool state)
|
||||
{
|
||||
QString str;
|
||||
|
||||
edit_time_edit->setEnabled(state);
|
||||
edit_grace_group->setEnabled(state);
|
||||
if(state) {
|
||||
graceClickedData(edit_grace_group->selectedId());
|
||||
str=QString(tr("Transition If Previous Cart Ends Before"));
|
||||
edit_time_label->
|
||||
setText(QString().sprintf("%s %s:",(const char *)str,
|
||||
(const char *)edit_time_edit->time().
|
||||
toString("hh:mm:ss.zzz").left(10)));
|
||||
setText(tr("Transition If Previous Cart Ends Before")+" "+
|
||||
edit_time_edit->time().toString("hh:mm:ss.zzz").left(10)+":");
|
||||
}
|
||||
else {
|
||||
edit_grace_box->setDisabled(true);
|
||||
edit_time_label->setText(tr("Transition Type:"));
|
||||
edit_time_label->setText(tr("Transition Type")+":");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,8 +297,8 @@ void EditChain::selectLogData()
|
||||
void EditChain::labelChangedData(const QString &logname)
|
||||
{
|
||||
QString sql=
|
||||
QString().sprintf("select DESCRIPTION from LOGS where NAME=\"%s\"",
|
||||
(const char *)logname);
|
||||
QString("select DESCRIPTION from LOGS where ")+
|
||||
"NAME=\""+RDEscapeString(logname)+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
if(!q->first()) {
|
||||
delete q;
|
||||
|
||||
Reference in New Issue
Block a user