mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2018-08-08 Fred Gleason <fredg@paravelsystems.com>
* Modified all instances of 'QStringList::split()' calls to use 'QString::split()'.
This commit is contained in:
@@ -191,7 +191,7 @@ void BtSs41Mlr::gpoOneshotData(int value)
|
||||
|
||||
void BtSs41Mlr::ProcessStatus(const QString &msg)
|
||||
{
|
||||
QStringList f0=f0.split(",",msg);
|
||||
QStringList f0=msg.split(",");
|
||||
|
||||
if(f0.size()==10) {
|
||||
if((f0[0]==QString().sprintf("S%dP",BTSS41MLR_UNIT_ID))&&(f0[1]=="A")) {
|
||||
|
||||
@@ -177,7 +177,7 @@ void BtU41MlrWeb::ProcessCommand(const QString &cmd)
|
||||
{
|
||||
// syslog(LOG_NOTICE,"ProcessCommand(%s)\n",(const char *)cmd);
|
||||
|
||||
QStringList cmds=cmds.split(",",cmd);
|
||||
QStringList cmds=cmd.split(",");
|
||||
|
||||
if((cmds.size()==7)&&(cmds[0]=="S0P")) {
|
||||
for(int i=0;i<BTU41MLRWEB_GPI_QUAN;i++) {
|
||||
|
||||
@@ -260,7 +260,7 @@ void Harlond::watchdogTimeoutData()
|
||||
void Harlond::ProcessResponse(const QString &str)
|
||||
{
|
||||
// LogLine(RDConfig::LogNotice,str);
|
||||
QStringList cmds=cmds.split(" ",str);
|
||||
QStringList cmds=str.split(" ");
|
||||
|
||||
if(cmds[0]=="PW") {
|
||||
if(cmds.size()==2) {
|
||||
|
||||
@@ -483,7 +483,7 @@ bool MainObject::DispatchCommand(RipcdConnection *conn)
|
||||
QHostAddress addr;
|
||||
|
||||
//printf("DispatchCommand(%s)\n",(const char *)conn->accum.toUtf8());
|
||||
QStringList cmds=cmds.split(" ",conn->accum);
|
||||
QStringList cmds=conn->accum.split(" ",QString::SkipEmptyParts);
|
||||
|
||||
//
|
||||
// Common Commands
|
||||
@@ -672,7 +672,8 @@ void MainObject::ReadRmlSocket(QUdpSocket *sock,RDMacro::Role role,
|
||||
if(!macro.isNull()) {
|
||||
if(macro.command()==RDMacro::AG) {
|
||||
if(ripc_onair_flag) {
|
||||
QStringList f0=f0.split(" ",QString::fromUtf8(buffer));
|
||||
QStringList f0=
|
||||
QString::fromUtf8(buffer).split(" ",QString::SkipEmptyParts);
|
||||
f0.pop_front();
|
||||
QString rmlstr=f0.join(" ");
|
||||
macro=RDMacro::fromString(rmlstr);
|
||||
|
||||
@@ -305,7 +305,7 @@ void SoftwareAuthority::DispatchCommand()
|
||||
return;
|
||||
}
|
||||
swa_inputs++;
|
||||
f0=f0.split("\t",line_in);
|
||||
f0=line_in.split("\t",QString::KeepEmptyParts);
|
||||
name=f0[1];
|
||||
if(f0.size()>=7) {
|
||||
name=f0[6]+": "+f0[2];
|
||||
@@ -357,7 +357,7 @@ void SoftwareAuthority::DispatchCommand()
|
||||
return;
|
||||
}
|
||||
swa_outputs++;
|
||||
f0=f0.split("\t",line_in);
|
||||
f0=line_in.split("\t",QString::KeepEmptyParts);
|
||||
name=f0[1];
|
||||
if(f0.size()>=6) {
|
||||
name=f0[3]+"/"+f0[5]+": "+f0[2];
|
||||
@@ -400,7 +400,7 @@ void SoftwareAuthority::DispatchCommand()
|
||||
//
|
||||
// GPIO State Parser
|
||||
//
|
||||
f0=f0.split(" ",section);
|
||||
f0=section.split(" ");
|
||||
if((f0.size()==4)&&(f0[0].lower()=="gpistat")&&(f0[1].toInt()==swa_card)) {
|
||||
if(swa_gpi_states[f0[2].toInt()].isEmpty()) {
|
||||
swa_gpi_states[f0[2].toInt()]=f0[3];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// wheatnet_lio.cpp
|
||||
//
|
||||
// A Rivendell switcher driver for Modbus TCP
|
||||
// A Rivendell switcher driver for WheatNet LIO
|
||||
//
|
||||
// (C) Copyright 2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2017-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -282,7 +282,7 @@ void WheatnetLio::ProcessSys(const QString &cmd)
|
||||
RDSqlQuery *q;
|
||||
bool ok=false;
|
||||
|
||||
QStringList f0=f0.split(":",cmd);
|
||||
QStringList f0=cmd.split(":");
|
||||
if((f0[0]=="LIO")&&(f0.size()==2)) {
|
||||
int lio=f0[1].toUInt(&ok);
|
||||
if(ok) {
|
||||
@@ -324,7 +324,7 @@ void WheatnetLio::ProcessSys(const QString &cmd)
|
||||
void WheatnetLio::ProcessLioevent(int chan,QString &cmd)
|
||||
{
|
||||
// printf("ProcessLioevent(%d,%s)\n",chan,(const char *)cmd);
|
||||
QStringList f0=f0.split(":",cmd);
|
||||
QStringList f0=cmd.split(":");
|
||||
if((f0[0]=="LVL")&&(f0.size()==2)) {
|
||||
if(chan<(int)lio_gpi_states.size()) {
|
||||
bool state=f0[1]=="1";
|
||||
@@ -353,14 +353,14 @@ void WheatnetLio::ProcessCommand(const QString &cmd)
|
||||
bool ok=false;
|
||||
|
||||
if((cmd.left(1)=="<")&&(cmd.right(1)==">")) {
|
||||
QStringList f0=f0.split("|",cmd.mid(1,cmd.length()-2));
|
||||
QStringList f0=cmd.mid(1,cmd.length()-2).split("|");
|
||||
if(f0.size()==2) {
|
||||
QStringList f1=f1.split(":",f0[0]);
|
||||
QStringList f1=f0[0].split(":");
|
||||
if(f1[0]=="SYS") {
|
||||
ProcessSys(f0[1]);
|
||||
}
|
||||
if((f1[0]=="LIOEVENT")&&(f1.size()==2)) {
|
||||
QStringList f2=f2.split(".",f1[1]);
|
||||
QStringList f2=f1[1].split(".");
|
||||
if((f2[0]=="0")&&(f2.size()==2)) {
|
||||
int chan=f2[1].toUInt(&ok);
|
||||
if(ok) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// wheatnet_slio.cpp
|
||||
//
|
||||
// A Rivendell switcher driver for Modbus TCP
|
||||
// A Rivendell switcher driver for WheatNet SLIO
|
||||
//
|
||||
// (C) Copyright 2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2017-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -279,7 +279,7 @@ void WheatnetSlio::ProcessSys(const QString &cmd)
|
||||
RDSqlQuery *q;
|
||||
bool ok=false;
|
||||
|
||||
QStringList f0=f0.split(":",cmd);
|
||||
QStringList f0=cmd.split(":");
|
||||
if((f0[0]=="SLIO")&&(f0.size()==2)) {
|
||||
int slio=f0[1].toUInt(&ok);
|
||||
if(ok) {
|
||||
@@ -321,7 +321,7 @@ void WheatnetSlio::ProcessSys(const QString &cmd)
|
||||
void WheatnetSlio::ProcessSlioevent(int chan,QString &cmd)
|
||||
{
|
||||
// printf("ProcessSlip(%d,%s)\n",chan,(const char *)cmd);
|
||||
QStringList f0=f0.split(":",cmd);
|
||||
QStringList f0=cmd.split(":");
|
||||
if((f0[0]=="LVL")&&(f0.size()==2)) {
|
||||
if(chan<=(int)slio_gpi_states.size()) {
|
||||
bool state=f0[1]=="1";
|
||||
@@ -351,9 +351,9 @@ void WheatnetSlio::ProcessCommand(const QString &cmd)
|
||||
bool ok=false;
|
||||
|
||||
if((cmd.left(1)=="<")&&(cmd.right(1)==">")) {
|
||||
QStringList f0=f0.split("|",cmd.mid(1,cmd.length()-2));
|
||||
QStringList f0=cmd.mid(1,cmd.length()-2).split("|");
|
||||
if(f0.size()==2) {
|
||||
QStringList f1=f1.split(":",f0[0]);
|
||||
QStringList f1=f0[0].split(":");
|
||||
if(f1[0]=="SYS") {
|
||||
ProcessSys(f0[1]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user