mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2021-09-01 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up deprecation warnings for 'QString::sprintf()'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -162,7 +162,7 @@ void Xport::ListCarts()
|
||||
where=RDCartSearchText(filter,group_name,"",false);
|
||||
}
|
||||
if(cart_type!=RDCart::All) {
|
||||
where+=QString().sprintf("&&(`TYPE`=%u)",cart_type);
|
||||
where+=QString::asprintf("&&(`TYPE`=%u)",cart_type);
|
||||
}
|
||||
sql=RDCart::xmlSql(include_cuts)+where+" order by `CART`.`NUMBER`";
|
||||
q=new RDSqlQuery(sql);
|
||||
@@ -297,7 +297,7 @@ void Xport::EditCart()
|
||||
|
||||
case RDCart::Macro:
|
||||
line=0;
|
||||
while(xport_post->getValue(QString().sprintf("MACRO%d",line++),&value)) {
|
||||
while(xport_post->getValue(QString::asprintf("MACRO%d",line++),&value)) {
|
||||
value=value.trimmed();
|
||||
if(value.right(1)!="!") {
|
||||
delete cart;
|
||||
@@ -529,7 +529,7 @@ void Xport::ListCuts()
|
||||
// Process Request
|
||||
//
|
||||
sql=RDCart::xmlSql(true)+
|
||||
QString().sprintf(" where `CART`.`NUMBER`=%u",cart_number);
|
||||
QString::asprintf(" where `CART`.`NUMBER`=%u",cart_number);
|
||||
q=new RDSqlQuery(sql);
|
||||
printf("Content-type: application/xml\n");
|
||||
printf("Status: 200\n\n");
|
||||
|
||||
@@ -175,7 +175,7 @@ void Xport::ListLogs()
|
||||
sql=sql.left(sql.length()-5);
|
||||
}
|
||||
if(recent=="1") {
|
||||
sql+=QString().sprintf(" order by `LOGS`.`ORIGIN_DATETIME` desc limit %d",
|
||||
sql+=QString::asprintf(" order by `LOGS`.`ORIGIN_DATETIME` desc limit %d",
|
||||
RD_LOGFILTER_LIMIT_QUAN);
|
||||
}
|
||||
else {
|
||||
@@ -295,7 +295,7 @@ void Xport::SaveLog()
|
||||
for(int i=0;i<line_quantity;i++) {
|
||||
logmodel->insert(i,1);
|
||||
RDLogLine *ll=logmodel->logLine(i);
|
||||
QString line=QString().sprintf("LINE%d",i);
|
||||
QString line=QString::asprintf("LINE%d",i);
|
||||
QString str;
|
||||
int integer1;
|
||||
int integer2;
|
||||
@@ -540,7 +540,7 @@ void Xport::SaveLog()
|
||||
XmlExit("invalid log lock",400);
|
||||
}
|
||||
}
|
||||
XmlExit(QString().sprintf("OK Saved %d events",logmodel->lineCount()),
|
||||
XmlExit(QString::asprintf("OK Saved %d events",logmodel->lineCount()),
|
||||
200,"logs.cpp",LINE_NUMBER);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void Xport::SavePodcast()
|
||||
LINE_NUMBER);
|
||||
}
|
||||
if(chmod(destpath.toUtf8(),S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)!=0) {
|
||||
err_msg=QString().sprintf("Internal server error [%s]",strerror(errno));
|
||||
err_msg=QString::asprintf("Internal server error [%s]",strerror(errno));
|
||||
unlink(destpath.toUtf8());
|
||||
delete feed;
|
||||
delete cast;
|
||||
@@ -154,13 +154,13 @@ void Xport::GetPodcast()
|
||||
destpath=QString(RD_AUDIO_ROOT)+"/"+cast->audioFilename();
|
||||
|
||||
if((fd=open(destpath.toUtf8(),O_RDONLY))<0) {
|
||||
err_msg=QString().sprintf("Internal server error [%s]",strerror(errno));
|
||||
err_msg=QString::asprintf("Internal server error [%s]",strerror(errno));
|
||||
delete cast;
|
||||
XmlExit(err_msg.toUtf8(),500,"podcasts.cpp",LINE_NUMBER);
|
||||
}
|
||||
memset(&st,0,sizeof(st));
|
||||
if(fstat(fd,&st)!=0) {
|
||||
err_msg=QString().sprintf("Internal server error [%s]",strerror(errno));
|
||||
err_msg=QString::asprintf("Internal server error [%s]",strerror(errno));
|
||||
delete cast;
|
||||
XmlExit(err_msg.toUtf8(),500,"podcasts.cpp",LINE_NUMBER);
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void Xport::DeletePodcast()
|
||||
|
||||
if(unlink(destpath.toUtf8())!=0) {
|
||||
if(errno!=ENOENT) {
|
||||
err_msg=QString().sprintf("Internal server error [%s]",strerror(errno));
|
||||
err_msg=QString::asprintf("Internal server error [%s]",strerror(errno));
|
||||
delete cast;
|
||||
XmlExit(err_msg.toUtf8(),500,"podcasts.cpp",LINE_NUMBER);
|
||||
}
|
||||
@@ -573,7 +573,7 @@ void Xport::PostImage()
|
||||
"`DATA`,"+ // 01
|
||||
"`FILE_EXTENSION` "+ // 02
|
||||
"from FEED_IMAGES where "+
|
||||
QString().sprintf("ID=%d",img_id);
|
||||
QString::asprintf("ID=%d",img_id);
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
feed_id=q->value(0).toUInt();
|
||||
@@ -684,7 +684,7 @@ void Xport::RemoveImage()
|
||||
"`FEED_ID`,"+ // 00
|
||||
"`FILE_EXTENSION` "+ // 01
|
||||
"from `FEED_IMAGES` where "+
|
||||
QString().sprintf("`ID`=%d",img_id);
|
||||
QString::asprintf("`ID`=%d",img_id);
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->first()) {
|
||||
feed_id=q->value(0).toUInt();
|
||||
|
||||
@@ -453,12 +453,12 @@ void Xport::XmlExit(const QString &str,int code,const QString &srcfile,
|
||||
if(code>=400) {
|
||||
rda->syslog(LOG_WARNING,"%s '%s' %s",
|
||||
(const char *)str.toUtf8(),(const char *)srcfile.toUtf8(),
|
||||
(srcline>0)?(const char *)QString().sprintf("line %d",srcline).
|
||||
(srcline>0)?(const char *)QString::asprintf("line %d",srcline).
|
||||
toUtf8():"");
|
||||
}
|
||||
#ifdef RDXPORT_DEBUG
|
||||
if(srcline>0) {
|
||||
RDXMLResult((str+" \""+srcfile+"\" "+QString().sprintf("line %d",srcline)).toUtf8(),
|
||||
RDXMLResult((str+" \""+srcfile+"\" "+QString::asprintf("line %d",srcline)).toUtf8(),
|
||||
code,err);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user