mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2021-02-24 Fred Gleason <fredg@paravelsystems.com>
* Updated build system to use Qt5 instead of Qt4. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
##
|
||||
## Use automake to process this into a Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@
|
||||
AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@
|
||||
LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi
|
||||
MOC = @QT_MOC@
|
||||
|
||||
@@ -131,7 +131,7 @@ nodist_ripcd_SOURCES = moc_am16.cpp\
|
||||
|
||||
ripcd_LDADD = @LIB_RDLIBS@\
|
||||
@LIBVORBIS@\
|
||||
@QT4_LIBS@\
|
||||
@QT5_LIBS@\
|
||||
@LIBHPI@\
|
||||
@LIBJACK@\
|
||||
@MUSICBRAINZ_LIBS@
|
||||
|
@@ -109,7 +109,7 @@ void Gvc7000::processCommand(RDMacro *cmd)
|
||||
emit rmlEcho(cmd);
|
||||
return;
|
||||
}
|
||||
gvc_pacer->send(ToSeries7000Native(QString().sprintf("TI,%04X,%04X",cmd->arg(2).toInt()-1,cmd->arg(1).toInt()-1)).toAscii());
|
||||
gvc_pacer->send(ToSeries7000Native(QString().sprintf("TI,%04X,%04X",cmd->arg(2).toInt()-1,cmd->arg(1).toInt()-1)).toUtf8());
|
||||
cmd->acknowledge(true);
|
||||
emit rmlEcho(cmd);
|
||||
break;
|
||||
@@ -130,7 +130,7 @@ void Gvc7000::ipConnect()
|
||||
|
||||
void Gvc7000::keepaliveData()
|
||||
{
|
||||
gvc_pacer->send(ToSeries7000Native("QJ").toAscii());
|
||||
gvc_pacer->send(ToSeries7000Native("QJ").toUtf8());
|
||||
}
|
||||
|
||||
|
||||
@@ -189,8 +189,8 @@ void Gvc7000::sendCommandData(const QByteArray &data)
|
||||
/*
|
||||
void Gvc7000::SendCommand(const QString &str)
|
||||
{
|
||||
syslog(LOG_DEBUG,"gvc7000 sending \"%s\"",(const char *)str.toAscii());
|
||||
gvc_socket->write(str.toAscii());
|
||||
syslog(LOG_DEBUG,"gvc7000 sending \"%s\"",(const char *)str.toUtf8());
|
||||
gvc_socket->write(str.toUtf8());
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -207,9 +207,10 @@ QString Gvc7000::ToSeries7000Native(const QString &str) const
|
||||
"0"+ // Sequence Flag
|
||||
ret; // Data
|
||||
|
||||
QByteArray data=msg.toUtf8();
|
||||
uint8_t sum=0;
|
||||
for(int i=0;i<msg.length();i++) {
|
||||
sum+=msg.at(i).toAscii();
|
||||
for(int i=0;i<data.length();i++) {
|
||||
sum+=data.at(i);
|
||||
}
|
||||
sum=0x100-sum;
|
||||
|
||||
|
@@ -132,7 +132,7 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
rda->cae()->connectHost();
|
||||
|
||||
if(qApp->argc()!=1) {
|
||||
if(qApp->arguments().size()!=1) {
|
||||
debug=true;
|
||||
}
|
||||
::signal(SIGCHLD,SigHandler);
|
||||
@@ -310,14 +310,14 @@ void MainObject::readyReadData(int conn_id)
|
||||
QString line=QString::fromUtf8(data);
|
||||
for(int i=0;i<line.length();i++) {
|
||||
QChar c=line.at(i);
|
||||
if(c.toAscii()=='!') {
|
||||
if(c==QChar('!')) {
|
||||
if(!DispatchCommand(conn)) {
|
||||
return;
|
||||
}
|
||||
conn->accum="";
|
||||
}
|
||||
else {
|
||||
if((c.toAscii()!='\r')&&(c.toAscii()!='\n')) {
|
||||
if((c!=QChar('\r'))&&(c!=QChar('\n'))) {
|
||||
conn->accum+=c;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user