From 57abeada3ce145a21e80b138aafd601a622b3908 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Wed, 24 Feb 2021 16:12:22 -0500 Subject: [PATCH] 2021-02-24 Fred Gleason * Updated build system to use Qt5 instead of Qt4. Signed-off-by: Fred Gleason --- ChangeLog | 2 + INSTALL | 2 +- cae/Makefile.am | 4 +- cae/cae.cpp | 8 ++-- cae/cae_server.cpp | 2 +- configure.ac | 7 +-- importers/Makefile.am | 14 +++--- importers/panel_copy.cpp | 19 ++++---- importers/rdcatch_copy.cpp | 33 +++++++------ importers/rivendell_filter.cpp | 41 ++++++++--------- importers/sas_filter.cpp | 15 +++--- importers/wings_filter.cpp | 20 ++++---- lib/Makefile.am | 2 +- lib/rdaudioconvert.cpp | 2 +- lib/rdaudioinfo.cpp | 1 - lib/rdbusybar.cpp | 2 +- lib/rdbusybar.h | 2 +- lib/rdbusydialog.cpp | 2 +- lib/rdbusydialog.h | 2 +- lib/rdcartdrag.cpp | 12 ++--- lib/rdcartdrag.h | 9 ++-- lib/rdcmd_switch.cpp | 54 +++++++++++++++++++++- lib/rdcmd_switch.h | 5 +- lib/rdcoreapplication.cpp | 5 +- lib/rdedit_audio.cpp | 6 ++- lib/rdemptycart.cpp | 2 + lib/rdescape_string.cpp | 32 +++++++------ lib/rdfeedlistmodel.cpp | 19 ++++---- lib/rdflacdecode.cpp | 2 +- lib/rdgpiologmodel.cpp | 8 ++-- lib/rdhotkeylist.cpp | 26 ++++------- lib/rdlibrarymodel.cpp | 19 ++++---- lib/rdlivewire.cpp | 2 +- lib/rdlogplay.cpp | 5 ++ lib/rdmblookup.cpp | 2 +- lib/rdpanel_button.cpp | 7 +-- lib/rdripc.cpp | 4 +- lib/rdsendmail.cpp | 10 ++-- lib/rdslotbox.cpp | 4 +- lib/rdsocketstrings.cpp | 18 +++++++- lib/rdtimeedit.cpp | 10 ++-- lib/rdtimeedit.h | 2 +- lib/rdttydevice.cpp | 2 +- lib/rdwavefile.cpp | 32 ++++++------- lib/rdweb.cpp | 2 +- rdadmin/Makefile.am | 4 +- rdairplay/Makefile.am | 4 +- rdairplay/loglinebox.cpp | 5 +- rdairplay/logtableview.cpp | 6 +-- rdcartslots/Makefile.am | 4 +- rdcastmanager/Makefile.am | 4 +- rdcatch/Makefile.am | 4 +- rdcatch/vbox.cpp | 2 +- rdcatch/vbox.h | 2 +- rdcatchd/Makefile.am | 4 +- rdcatchd/rdcatchd.cpp | 24 ++++------ rdhpi/Makefile.am | 2 +- rdlibrary/Makefile.am | 4 +- rdlogedit/Makefile.am | 6 +-- rdlogedit/logtableview.cpp | 6 +-- rdlogedit/voice_tracker.cpp | 5 +- rdlogin/Makefile.am | 4 +- rdlogmanager/Makefile.am | 4 +- rdlogmanager/importcartsview.cpp | 4 +- rdmonitor/Makefile.am | 4 +- rdmonitor/rdmonitor.cpp | 2 +- rdpadd/Makefile.am | 4 +- rdpadd/rdpadd.cpp | 8 ++-- rdpadengined/Makefile.am | 4 +- rdpanel/Makefile.am | 4 +- rdrepld/Makefile.am | 4 +- rdrepld/citadelxds.cpp | 4 +- rdrepld/rdrepld.cpp | 2 +- rdrssd/Makefile.am | 4 +- rdselect/Makefile.am | 4 +- rdselect/rdselect.cpp | 2 +- rdservice/Makefile.am | 4 +- rdvairplayd/Makefile.am | 4 +- ripcd/Makefile.am | 4 +- ripcd/gvc7000.cpp | 13 +++--- ripcd/ripcd.cpp | 6 +-- tests/Makefile.am | 56 +++++++++++------------ tests/audio_peaks_test.cpp | 4 +- tests/cmdline_parser_test.cpp | 3 +- tests/datedecode_test.cpp | 6 +-- tests/dateparse_test.cpp | 4 +- tests/db_charset_test.cpp | 4 +- tests/getpids_test.cpp | 4 +- tests/log_unlink_test.cpp | 6 +-- tests/mcast_recv_test.cpp | 4 +- tests/rdxml_parse_test.cpp | 4 +- tests/readcd_test.cpp | 4 +- tests/reserve_carts_test.cpp | 5 +- tests/sendmail_test.cpp | 4 +- tests/stringcode_test.cpp | 4 +- tests/test_hash.cpp | 3 +- tests/test_pam.cpp | 3 +- tests/wav_chunk_test.cpp | 4 +- utils/rdalsaconfig/Makefile.am | 4 +- utils/rdcheckcuts/Makefile.am | 4 +- utils/rdcleandirs/Makefile.am | 4 +- utils/rdcleandirs/rdcleandirs.cpp | 3 +- utils/rdclilogedit/Makefile.am | 4 +- utils/rdcollect/Makefile.am | 4 +- utils/rdcollect/rdcollect.cpp | 3 +- utils/rdconvert/Makefile.am | 4 +- utils/rddbconfig/Makefile.am | 4 +- utils/rddbmgr/Makefile.am | 4 +- utils/rddbmgr/create.cpp | 4 +- utils/rddbmgr/rddbmgr.cpp | 3 +- utils/rddelete/Makefile.am | 4 +- utils/rddelete/rddelete.cpp | 6 +-- utils/rddgimport/Makefile.am | 4 +- utils/rdexport/Makefile.am | 4 +- utils/rdgpimon/Makefile.am | 4 +- utils/rdimport/Makefile.am | 4 +- utils/rdimport/rdimport.cpp | 8 ++-- utils/rdmaint/Makefile.am | 4 +- utils/rdmarkerset/Makefile.am | 4 +- utils/rdmetadata/Makefile.am | 4 +- utils/rdpopup/Makefile.am | 4 +- utils/rdpopup/rdpopup.cpp | 14 +++--- utils/rdrender/Makefile.am | 4 +- utils/rdselect_helper/Makefile.am | 4 +- utils/rdselect_helper/rdselect_helper.cpp | 8 ++-- utils/rdsoftkeys/Makefile.am | 4 +- utils/rdsoftkeys/rdsoftkeys.cpp | 3 +- utils/rmlsend/Makefile.am | 4 +- web/rdxport/Makefile.am | 4 +- web/webget/Makefile.am | 6 +-- 130 files changed, 481 insertions(+), 441 deletions(-) diff --git a/ChangeLog b/ChangeLog index 33bbd81a..5e62a3be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21176,3 +21176,5 @@ * Removed the Qt3Support library from the build system. 2021-02-24 Fred Gleason * Removed stray include lines. +2021-02-24 Fred Gleason + * Updated build system to use Qt5 instead of Qt4. diff --git a/INSTALL b/INSTALL index cfd1ac8e..d4e8b9a3 100644 --- a/INSTALL +++ b/INSTALL @@ -69,7 +69,7 @@ Requests, v2.12.5 or later HTTP transfer library for Python. Available at http://docs.python-requests.org/. -Qt4 Toolkit, v4.6 or better +Qt5 Toolkit, v5.9 or better Most modern Linux distros include this. It can also be downloaded directly at http://www.qt.io/. diff --git a/cae/Makefile.am b/cae/Makefile.am index 5316a096..08956fdd 100644 --- a/cae/Makefile.am +++ b/cae/Makefile.am @@ -19,7 +19,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi -Wno-strict-aliasing @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi MOC = @QT_MOC@ @@ -44,7 +44,7 @@ caed_LDADD = @LIB_RDLIBS@\ @LIBJACK@\ @LIBSRC@\ @LIBVORBIS@\ - @QT4_LIBS@\ + @QT5_LIBS@\ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ diff --git a/cae/cae.cpp b/cae/cae.cpp index 5f9f35fa..26d374c8 100644 --- a/cae/cae.cpp +++ b/cae/cae.cpp @@ -91,7 +91,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - new RDCmdSwitch(qApp->argc(),qApp->argv(),"caed",CAED_USAGE); + new RDCmdSwitch("caed",CAED_USAGE); // // LogLine references rd_config @@ -108,9 +108,9 @@ MainObject::MainObject(QObject *parent) debug=false; twolame_handle=NULL; mad_handle=NULL; - if(qApp->argc()>1) { - for(int i=1;iargc();i++) { - if(!strcmp(qApp->argv()[i],"-d")) { + if(qApp->arguments().size()>1) { + for(int i=1;iarguments().size();i++) { + if(qApp->arguments().at(i)=="-d") { debug=true; } } diff --git a/cae/cae_server.cpp b/cae/cae_server.cpp index 7a55e36a..7ad2bfd0 100644 --- a/cae/cae_server.cpp +++ b/cae/cae_server.cpp @@ -143,7 +143,7 @@ void CaeServer::sendCommand(int id,const QString &cmd) RDApplication::syslog(cae_config,LOG_DEBUG, "send[%d]: %s",id,(const char *)cmd.toUtf8()); #endif // __CAE_SERVER_LOG_PROTOCOL_MESSAGES - cae_connections.value(id)->socket->write(cmd.toAscii()); + cae_connections.value(id)->socket->write(cmd.toUtf8()); } diff --git a/configure.ac b/configure.ac index faa9b48f..cbdec9c1 100644 --- a/configure.ac +++ b/configure.ac @@ -116,10 +116,11 @@ AC_ARG_ENABLE(rdxport-debug,[ --enable-rdxport-debug enable DEBUG support for # -# Check for Qt4 (Mandatory) +# Check for Qt5 (Mandatory) # -PKG_CHECK_MODULES(QT4,QtCore QtGui QtNetwork QtSql QtXml,,[AC_MSG_ERROR([*** Qt4 not found ***])]) -AC_CHECK_PROG(MOC_NAME,moc-qt4,[moc-qt4],[moc]) +PKG_CHECK_MODULES(QT5,Qt5Core Qt5Widgets Qt5Gui Qt5Network Qt5Sql Qt5Xml,,[AC_MSG_ERROR([*** Qt5 not found ***])]) +PKG_CHECK_MODULES(QT5_CLI,Qt5Core Qt5Network Qt5Sql Qt5Xml,,[AC_MSG_ERROR([*** Qt5 not found ***])]) +AC_CHECK_PROG(MOC_NAME,moc-qt5,[moc-qt5],[moc]) AC_SUBST(QT_MOC,$MOC_NAME) diff --git a/importers/Makefile.am b/importers/Makefile.am index ec68f6a7..8219a2ae 100644 --- a/importers/Makefile.am +++ b/importers/Makefile.am @@ -20,7 +20,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -37,27 +37,27 @@ bin_PROGRAMS = nexgen_filter\ dist_nexgen_filter_SOURCES = nexgen_filter.cpp nexgen_filter.h nodist_nexgen_filter_SOURCES = moc_nexgen_filter.cpp -nexgen_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +nexgen_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_panel_copy_SOURCES = panel_copy.cpp panel_copy.h nodist_panel_copy_SOURCES = moc_panel_copy.cpp -panel_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +panel_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_rdcatch_copy_SOURCES = rdcatch_copy.cpp rdcatch_copy.h nodist_rdcatch_copy_SOURCES = moc_rdcatch_copy.cpp -rdcatch_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcatch_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_rivendell_filter_SOURCES = rivendell_filter.cpp rivendell_filter.h nodist_rivendell_filter_SOURCES = moc_rivendell_filter.cpp -rivendell_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rivendell_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_sas_filter_SOURCES = sas_filter.cpp sas_filter.h nodist_sas_filter_SOURCES = moc_sas_filter.cpp -sas_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +sas_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_wings_filter_SOURCES = wings_filter.cpp wings_filter.h nodist_wings_filter_SOURCES = moc_wings_filter.cpp -wings_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +wings_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = export_slax diff --git a/importers/panel_copy.cpp b/importers/panel_copy.cpp index 3cd456c5..bed1a4cf 100644 --- a/importers/panel_copy.cpp +++ b/importers/panel_copy.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -48,8 +48,7 @@ MainObject::MainObject(QObject *parent) // Read Command Options // RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"panel_copy", - PANEL_COPY_USAGE); + new RDCmdSwitch("panel_copy",PANEL_COPY_USAGE); delete cmd; rd_config=new RDConfig(RD_CONF_FILE); @@ -59,22 +58,22 @@ MainObject::MainObject(QObject *parent) // // Read Switches // - for(int i=1;iargc();i+=2) { + for(int i=1;iarguments().size();i+=2) { found=false; - if(QString(qApp->argv()[i])=="-h") { // Source mySQL Hostname - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-h") { // Source mySQL Hostname + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"panel_copy: invalid argument\n"); exit(256); } - src_hostname=qApp->argv()[i+1]; + src_hostname=qApp->arguments().at(i+1); found=true; } - if(QString(qApp->argv()[i])=="-H") { // Source mySQL Hostname - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-H") { // Source mySQL Hostname + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"panel_copy: invalid argument\n"); exit(256); } - dest_hostname=qApp->argv()[i+1]; + dest_hostname=qApp->arguments().at(i+1); found=true; } if(!found) { diff --git a/importers/rdcatch_copy.cpp b/importers/rdcatch_copy.cpp index 515f0185..8796b2e4 100644 --- a/importers/rdcatch_copy.cpp +++ b/importers/rdcatch_copy.cpp @@ -2,7 +2,7 @@ // // An RDCatch event copier. // -// (C) Copyright 2002-2005,2016-2018 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -48,8 +48,7 @@ MainObject::MainObject(QObject *parent) // Read Command Options // RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcatch_copy", - RDCATCH_COPY_USAGE); + new RDCmdSwitch("rdcatch_copy",RDCATCH_COPY_USAGE); delete cmd; rd_config=new RDConfig(RD_CONF_FILE); @@ -59,38 +58,38 @@ MainObject::MainObject(QObject *parent) // // Read Switches // - for(int i=1;iargc();i+=2) { + for(int i=1;iarguments().size();i+=2) { found=false; - if(QString(qApp->argv()[i])=="-h") { // Source mySQL Hostname - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-h") { // Source mySQL Hostname + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"rdcatch_copy: invalid argument\n"); exit(256); } - src_hostname=qApp->argv()[i+1]; + src_hostname=qApp->arguments().at(i+1); found=true; } - if(QString(qApp->argv()[i])=="-s") { // Source Rivendell Host - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-s") { // Source Rivendell Host + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"rdcatch_copy: invalid argument\n"); exit(256); } - src_station=qApp->argv()[i+1]; + src_station=qApp->arguments().at(i+1); found=true; } - if(QString(qApp->argv()[i])=="-H") { // Source mySQL Hostname - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-H") { // Source mySQL Hostname + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"rdcatch_copy: invalid argument\n"); exit(256); } - dest_hostname=qApp->argv()[i+1]; + dest_hostname=qApp->arguments().at(i+1); found=true; } - if(QString(qApp->argv()[i])=="-S") { // Source Rivendell Host - if((i+1)==qApp->argc()) { + if(QString(qApp->arguments().at(i))=="-S") { // Source Rivendell Host + if((i+1)==qApp->arguments().size()) { fprintf(stderr,"rdcatch_copy: invalid argument\n"); exit(256); } - dest_station=qApp->argv()[i+1]; + dest_station=qApp->arguments().at(i+1); found=true; } if(!found) { diff --git a/importers/rivendell_filter.cpp b/importers/rivendell_filter.cpp index a998a572..a274bcb5 100644 --- a/importers/rivendell_filter.cpp +++ b/importers/rivendell_filter.cpp @@ -2,7 +2,7 @@ // // A Library import filter for an external Rivendell system // -// (C) Copyright 2002-2005,2008 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -24,10 +24,8 @@ #include #include -#include -#include -//Added by qt3to4: -#include +#include +#include #include #include @@ -75,8 +73,7 @@ MainObject::MainObject(QObject *parent) // Read Command Options // RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rivendell_filter", - RIVENDELL_FILTER_USAGE); + new RDCmdSwitch("rivendell_filter",RIVENDELL_FILTER_USAGE); delete cmd; rdconfig=new RDConfig(RD_CONF_FILE); @@ -100,38 +97,38 @@ MainObject::MainObject(QObject *parent) // // Read Arguments // - for(int i=1;i<(qApp->argc()-1);i+=2) { + for(int i=1;i<(qApp->arguments().size()-1);i+=2) { found=false; - if(!strcmp("-h",qApp->argv()[i])) { - ext_hostname=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-h") { + ext_hostname=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-u",qApp->argv()[i])) { - ext_username=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-u") { + ext_username=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-p",qApp->argv()[i])) { - ext_password=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-p") { + ext_password=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-A",qApp->argv()[i])) { - ext_audiodir=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-A") { + ext_audiodir=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-g",qApp->argv()[i])) { - default_group=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-g") { + default_group=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-s",qApp->argv()[i])) { - start_cartnum=QString(qApp->argv()[i+1]).toUInt(&ok); + if(qApp->arguments().at(i)=="-s") { + start_cartnum=QString(qApp->arguments().at(i+1)).toUInt(&ok); if(!ok) { fprintf(stderr,"\nrivendell_filter: invalid group number\n"); exit(256); } found=true; } - if(!strcmp("-e",qApp->argv()[i])) { - end_cartnum=QString(qApp->argv()[i+1]).toUInt(&ok); + if(qApp->arguments().at(i)=="-e") { + end_cartnum=QString(qApp->arguments().at(i+1)).toUInt(&ok); if(!ok) { fprintf(stderr,"\nrivendell_filter: invalid group number\n"); exit(256); diff --git a/importers/sas_filter.cpp b/importers/sas_filter.cpp index fa89c8bc..bfdf4caa 100644 --- a/importers/sas_filter.cpp +++ b/importers/sas_filter.cpp @@ -2,7 +2,7 @@ // // An RDCatch event import filter for the SAS64000 // -// (C) Copyright 2002-2004,2018 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -64,12 +64,14 @@ MainObject::MainObject(QObject *parent) // // Read Switches // - if((qApp->argc()==2)&&(!strcmp(qApp->argv()[1],"-d"))) { // Delete List + if((qApp->arguments().size()==2)&& // Delete List + (qApp->arguments().at(1)=="-d")) { DeleteList(); filter_connect->reset(); exit(0); } - if((qApp->argc()==3)&&(!strcmp(qApp->argv()[1],"-i"))) { // Insert List + if((qApp->arguments().size()==3)&& // Insert List + (qApp->arguments().at(1)=="-i")) { InsertList(); filter_connect->reset(); exit(0); @@ -84,12 +86,13 @@ void MainObject::InsertList() char line[256]; int count=0; - FILE *fh=fopen(qApp->argv()[2],"r"); + FILE *fh=fopen(qApp->arguments().at(2).toUtf8(),"r"); if(fh==NULL) { perror("sas_filter"); exit(1); } - printf("Importing events from %s...",qApp->argv()[2]); + printf("Importing events from %s...", + qApp->arguments().at(2).toUtf8().constData()); fflush(0); while(fgets(line,256,fh)!=NULL) { if(strlen(line)==79) { diff --git a/importers/wings_filter.cpp b/importers/wings_filter.cpp index 1a6691fd..aa6ab901 100644 --- a/importers/wings_filter.cpp +++ b/importers/wings_filter.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -64,22 +64,22 @@ MainObject::MainObject(QObject *parent) // // Read Arguments // - for(int i=1;i<(qApp->argc()-1);i+=2) { + for(int i=1;i<(qApp->arguments().size()-1);i+=2) { found=false; - if(!strcmp("-d",qApp->argv()[i])) { - dbname=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-d") { + dbname=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-A",qApp->argv()[i])) { - audiodir=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-A") { + audiodir=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-g",qApp->argv()[i])) { - groupname=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-g") { + groupname=qApp->arguments().at(i+1); found=true; } - if(!strcmp("-e",qApp->argv()[i])) { - audio_extension=qApp->argv()[i+1]; + if(qApp->arguments().at(i)=="-e") { + audio_extension=qApp->arguments().at(i+1); found=true; } if(!found) { diff --git a/lib/Makefile.am b/lib/Makefile.am index f59052c8..d291aab8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -20,7 +20,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ -Wno-strict-aliasing -I/usr/include/taglib +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ -Wno-strict-aliasing -std=c++11 -fPIC -I/usr/include/taglib MOC = @QT_MOC@ CWRAP = ../helpers/cwrap diff --git a/lib/rdaudioconvert.cpp b/lib/rdaudioconvert.cpp index 9f24e101..8919f402 100644 --- a/lib/rdaudioconvert.cpp +++ b/lib/rdaudioconvert.cpp @@ -1225,7 +1225,7 @@ RDAudioConvert::ErrorCode RDAudioConvert::Stage3Flac(SNDFILE *src_sf, /* * FLAC 1.2.x */ - switch(flac->init(dstfile.toAscii())) { + switch(flac->init(dstfile.toUtf8())) { case FLAC__STREAM_ENCODER_INIT_STATUS_OK: break; diff --git a/lib/rdaudioinfo.cpp b/lib/rdaudioinfo.cpp index ffe31c7e..f6d35bfd 100644 --- a/lib/rdaudioinfo.cpp +++ b/lib/rdaudioinfo.cpp @@ -113,7 +113,6 @@ RDAudioInfo::ErrorCode RDAudioInfo::runInfo(const QString &username, { long response_code; CURL *curl=NULL; - char url[1024]; CURLcode curl_err; struct curl_httppost *first=NULL; struct curl_httppost *last=NULL; diff --git a/lib/rdbusybar.cpp b/lib/rdbusybar.cpp index 2df45ce9..3a435db4 100644 --- a/lib/rdbusybar.cpp +++ b/lib/rdbusybar.cpp @@ -20,7 +20,7 @@ #include "rdbusybar.h" -RDBusyBar::RDBusyBar(QWidget *parent,Qt::WFlags f) +RDBusyBar::RDBusyBar(QWidget *parent,Qt::WindowFlags f) : QFrame(parent,f) { bar_pos=0; diff --git a/lib/rdbusybar.h b/lib/rdbusybar.h index 285bc1b3..69465231 100644 --- a/lib/rdbusybar.h +++ b/lib/rdbusybar.h @@ -32,7 +32,7 @@ class RDBusyBar : public QFrame Q_OBJECT public: - RDBusyBar(QWidget *parent=0,Qt::WFlags f=0); + RDBusyBar(QWidget *parent=0,Qt::WindowFlags f=0); public slots: void activate(bool state); diff --git a/lib/rdbusydialog.cpp b/lib/rdbusydialog.cpp index c5606a0e..2734efd9 100644 --- a/lib/rdbusydialog.cpp +++ b/lib/rdbusydialog.cpp @@ -21,7 +21,7 @@ #include "rdbusydialog.h" -RDBusyDialog::RDBusyDialog(QWidget *parent,Qt::WFlags f) +RDBusyDialog::RDBusyDialog(QWidget *parent,Qt::WindowFlags f) : RDDialog(parent) { bar_label=new QLabel(this); diff --git a/lib/rdbusydialog.h b/lib/rdbusydialog.h index 223be1d1..6266ecf4 100644 --- a/lib/rdbusydialog.h +++ b/lib/rdbusydialog.h @@ -28,7 +28,7 @@ class RDBusyDialog : public RDDialog { Q_OBJECT; public: - RDBusyDialog(QWidget *parent=0,Qt::WFlags f=0); + RDBusyDialog(QWidget *parent=0,Qt::WindowFlags f=0); ~RDBusyDialog(); QSize sizeHint() const; void show(const QString &caption,const QString &label); diff --git a/lib/rdcartdrag.cpp b/lib/rdcartdrag.cpp index a17140eb..b77f31b1 100644 --- a/lib/rdcartdrag.cpp +++ b/lib/rdcartdrag.cpp @@ -18,7 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include +#include #include #include "rd.h" @@ -46,17 +46,17 @@ bool RDCartDrag::hasFormat(const QString &mimetype) const } -bool RDCartDrag::canDecode(QMimeSource *e) +bool RDCartDrag::canDecode(const QMimeData *e) { - return e->provides(RDMIMETYPE_CART); + return e->hasFormat(RDMIMETYPE_CART); } -bool RDCartDrag::decode(QMimeSource *e,unsigned *cartnum,QColor *color, +bool RDCartDrag::decode(const QMimeData *e,unsigned *cartnum,QColor *color, QString *title) { RDProfile *p=new RDProfile(); - p->setSourceString(QString::fromUtf8(e->encodedData(RDMIMETYPE_CART))); + p->setSourceString(QString::fromUtf8(e->data(RDMIMETYPE_CART))); *cartnum=p->intValue("Rivendell-Cart","Number"); if(color!=NULL) { color->setNamedColor(p->stringValue("Rivendell-Cart","Color")); @@ -69,7 +69,7 @@ bool RDCartDrag::decode(QMimeSource *e,unsigned *cartnum,QColor *color, } -bool RDCartDrag::decode(QMimeSource *e,RDLogLine *ll, +bool RDCartDrag::decode(const QMimeData *e,RDLogLine *ll, RDLogLine::TransType next_trans,int log_mach, bool timescale,RDLogLine::TransType trans) { diff --git a/lib/rdcartdrag.h b/lib/rdcartdrag.h index 17b1ec39..6f6ea484 100644 --- a/lib/rdcartdrag.h +++ b/lib/rdcartdrag.h @@ -22,9 +22,10 @@ #define RDCARTDRAG_H #include +#include #include #include -#include +//#include #include #include @@ -36,10 +37,10 @@ class RDCartDrag : public QMimeData RDCartDrag(unsigned cartnum,const QString &title,const QColor &color); QStringList formats() const; bool hasFormat(const QString &mimetype) const; - static bool canDecode(QMimeSource *e); - static bool decode(QMimeSource *e,unsigned *cartnum,QColor *color=NULL, + static bool canDecode(const QMimeData *e); + static bool decode(const QMimeData *e,unsigned *cartnum,QColor *color=NULL, QString *title=NULL); - static bool decode(QMimeSource *e,RDLogLine *ll, + static bool decode(const QMimeData *e,RDLogLine *ll, RDLogLine::TransType next_trans=RDLogLine::Segue, int log_mach=0,bool timescale=false, RDLogLine::TransType trans=RDLogLine::NoTrans); diff --git a/lib/rdcmd_switch.cpp b/lib/rdcmd_switch.cpp index b8166155..33ac04b6 100644 --- a/lib/rdcmd_switch.cpp +++ b/lib/rdcmd_switch.cpp @@ -2,7 +2,7 @@ // // Process Rivendell Command-Line Switches // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -22,10 +22,60 @@ #include #include -#include +#include +#include #include +RDCmdSwitch::RDCmdSwitch(const QString &modname,const QString &usage) +{ + switch_debug=false; + + QStringList args=qApp->arguments(); + + for(int i=1;i=2) { + if(f0.at(0).left(1)=="-") { + switch_keys.push_back(f0.at(0)); + for(int i=2;i +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -27,8 +27,9 @@ class RDCmdSwitch { public: + RDCmdSwitch(const QString &modname,const QString &usage); RDCmdSwitch(int argc,char *argv[],const QString &modname, - const QString &usage); + const QString &usage); unsigned keys() const; QString key(unsigned n) const; QString value(unsigned n) const; diff --git a/lib/rdcoreapplication.cpp b/lib/rdcoreapplication.cpp index 51e5ab1b..20dded6b 100644 --- a/lib/rdcoreapplication.cpp +++ b/lib/rdcoreapplication.cpp @@ -125,8 +125,7 @@ bool RDCoreApplication::open(QString *err_msg,RDCoreApplication::ErrorType *err_ // // Read command switches // - app_cmd_switch=new RDCmdSwitch(qApp->argc(),qApp->argv(),app_command_name, - app_usage); + app_cmd_switch=new RDCmdSwitch(app_command_name,app_usage); for(unsigned i=0;ikeys();i++) { if(app_cmd_switch->key(i)=="--skip-db-check") { skip_db_check=true; @@ -477,7 +476,7 @@ void RDCoreApplication::userChangedData() delete q; } fprintf(stderr,"%s: %s\n", - QString(qApp->argv()[0]).split("/",QString::SkipEmptyParts).last().toUtf8().constData(), + QString(qApp->arguments().at(0)).split("/",QString::SkipEmptyParts).last().toUtf8().constData(), RDCoreApplication::exitCodeText(RDCoreApplication::ExitBadTicket). toUtf8().constData()); exit(RDCoreApplication::ExitBadTicket); diff --git a/lib/rdedit_audio.cpp b/lib/rdedit_audio.cpp index 382c9b42..16d810c4 100644 --- a/lib/rdedit_audio.cpp +++ b/lib/rdedit_audio.cpp @@ -37,7 +37,11 @@ RDEditAudio::RDEditAudio(RDCart *cart,QString cut_name,int card, int port,int preroll,int trim_level,QWidget *parent) : RDDialog(parent) { - setAttribute(Qt::WA_PaintOutsidePaintEvent); + // + // FIXME + // This entire dialog likely needs a rewrite! + // + // setAttribute(Qt::WA_PaintOutsidePaintEvent); edit_card=card; edit_port=port; edit_stream=-1; diff --git a/lib/rdemptycart.cpp b/lib/rdemptycart.cpp index 3c425905..2a882bd8 100644 --- a/lib/rdemptycart.cpp +++ b/lib/rdemptycart.cpp @@ -18,6 +18,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +#include + #include "rdemptycart.h" // diff --git a/lib/rdescape_string.cpp b/lib/rdescape_string.cpp index 9b7326de..780934b9 100644 --- a/lib/rdescape_string.cpp +++ b/lib/rdescape_string.cpp @@ -2,7 +2,7 @@ // // Escape non-valid characters in a string. // -// (C) Copyright 2002-2020 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -74,34 +74,36 @@ QString RDCheckDateTime(QDate const &date, QString const &format) } + QString RDEscapeString(QString const &str) { - QString orig=str; QString res; for(int i=0;i0)) { - return createIndex(index.internalId()-1,0,(quint32)0); + return createIndex(index.internalId()-1,0,(quintptr)0); } return QModelIndex(); } @@ -311,7 +311,7 @@ QModelIndex RDFeedListModel::feedRow(const QString &keyname) const if(pos<0) { return QModelIndex(); } - return createIndex(pos,0,(quint32)0); + return createIndex(pos,0,(quintptr)0); } @@ -368,7 +368,7 @@ QModelIndex RDFeedListModel::addFeed(const QString &keyname) endInsertRows(); emit rowCountChanged(d_texts.size()); - return createIndex(offset,0,0); + return createIndex(offset,0,(quintptr)0); } @@ -397,7 +397,7 @@ void RDFeedListModel::refreshRow(const QModelIndex &index) { if(isFeed(index)) { updateRowLine(index.row()); - emit dataChanged(index,createIndex(index.row(),columnCount(),0)); + emit dataChanged(index,createIndex(index.row(),columnCount(),(quintptr)0)); } } @@ -407,7 +407,8 @@ void RDFeedListModel::refreshFeed(const QString &keyname) for(int i=0;ifirst()) { updateRow(line,q); - emit dataChanged(createIndex(line,0,0), - createIndex(line,columnCount(),(quint32)0)); + emit dataChanged(createIndex(line,0,(quintptr)0), + createIndex(line,columnCount(),(quintptr)0)); } delete q; } diff --git a/lib/rdflacdecode.cpp b/lib/rdflacdecode.cpp index 57833a9e..d1a2a928 100644 --- a/lib/rdflacdecode.cpp +++ b/lib/rdflacdecode.cpp @@ -60,7 +60,7 @@ void RDFlacDecode::decode(RDWaveFile *wave,float *peak) (double)flac_end_point*(double)wave->getSamplesPerSec()/1000.0; } flac_total_frames=0; - init(wave->getName().toAscii()); + init(wave->getName().toUtf8()); //set_filename(wave->getName().ascii()); //init(); diff --git a/lib/rdgpiologmodel.cpp b/lib/rdgpiologmodel.cpp index 968c646b..9ecb8661 100644 --- a/lib/rdgpiologmodel.cpp +++ b/lib/rdgpiologmodel.cpp @@ -180,11 +180,11 @@ void RDGpioLogModel::addEvent(int line,bool state) // State if(state) { texts.push_back(tr("On")); - d_text_colors.push_back(Qt::darkGreen); + d_text_colors.push_back(QColor(Qt::darkGreen)); } else { texts.push_back(tr("Off")); - d_text_colors.push_back(Qt::darkRed); + d_text_colors.push_back(QColor(Qt::darkRed)); } d_texts.push_back(texts); @@ -277,11 +277,11 @@ void RDGpioLogModel::updateRow(int row,RDSqlQuery *q) // State if(q->value(2).toUInt()==0) { texts.push_back(tr("Off")); - d_text_colors[row]=Qt::darkRed; + d_text_colors[row]=QColor(Qt::darkRed); } else { texts.push_back(tr("On")); - d_text_colors[row]=Qt::darkGreen; + d_text_colors[row]=QColor(Qt::darkGreen); } d_texts[row]=texts; diff --git a/lib/rdhotkeylist.cpp b/lib/rdhotkeylist.cpp index e9351ffe..d1fda0e8 100644 --- a/lib/rdhotkeylist.cpp +++ b/lib/rdhotkeylist.cpp @@ -2,7 +2,7 @@ // // An Abstract of the rdhotkeylist // -// (C) Copyright 2002-2004,2010,2016 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // 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 @@ -18,10 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#include - -#include - #include RDHotKeyList::RDHotKeyList( ) @@ -106,21 +102,15 @@ void RDHotKeyList::BuildKeyList( ) QString RDHotKeyList::cleanStrings( const QString sent) { - QString cleanstring; - for (int i=0 ; i0)) { - return createIndex(index.internalId()-1,0,(quint32)0); + return createIndex(index.internalId()-1,0,(quintptr)0); } return QModelIndex(); } @@ -328,7 +328,7 @@ QModelIndex RDLibraryModel::cartRow(unsigned cartnum) const if(pos<0) { return QModelIndex(); } - return createIndex(pos,0,0); + return createIndex(pos,0,(quintptr)0); } @@ -416,7 +416,7 @@ QModelIndex RDLibraryModel::addCart(unsigned cartnum) endInsertRows(); emit rowCountChanged(d_texts.size()); - return createIndex(offset,0,0); + return createIndex(offset,0,(quintptr)0); } @@ -465,7 +465,7 @@ void RDLibraryModel::refreshRow(const QModelIndex &index) { if(isCart(index)) { updateCartLine(index.row()); - emit dataChanged(index,createIndex(index.row(),columnCount(),0)); + emit dataChanged(index,createIndex(index.row(),columnCount(),(quintptr)0)); } } @@ -476,7 +476,8 @@ void RDLibraryModel::refreshCart(unsigned cartnum) for(int i=0;ifirst()) { updateRow(cartline,q); - emit dataChanged(createIndex(cartline,0,0), - createIndex(cartline,columnCount(),(quint32)0)); + emit dataChanged(createIndex(cartline,0,(quintptr)0), + createIndex(cartline,columnCount(),(quintptr)0)); } delete q; } diff --git a/lib/rdlivewire.cpp b/lib/rdlivewire.cpp index eb2651c7..b49222ac 100644 --- a/lib/rdlivewire.cpp +++ b/lib/rdlivewire.cpp @@ -593,7 +593,7 @@ void RDLiveWire::DespatchCommand(const QString &cmd) void RDLiveWire::SendCommand(const QString &cmd) const { - live_socket->write((cmd+"\r\n").toAscii(),cmd.length()+2); + live_socket->write((cmd+"\r\n").toUtf8(),cmd.length()+2); } diff --git a/lib/rdlogplay.cpp b/lib/rdlogplay.cpp index 12e1e36a..487ea0d4 100644 --- a/lib/rdlogplay.cpp +++ b/lib/rdlogplay.cpp @@ -136,9 +136,14 @@ RDLogPlay::RDLogPlay(int id,RDEventPlayer *player,QObject *parent) // Audition Player // play_audition_line=-1; + if((rda->station()->cueCard()>=0)&& + (rda->station()->cuePort()>=0)&& + isWidgetType()) { + /* if((rda->station()->cueCard()>=0)&& (rda->station()->cuePort()>=0)&& (qApp->type()!=QApplication::Tty)) { + */ play_audition_player= new RDSimplePlayer(play_cae,rda->ripc(),rda->station()->cueCard(), rda->station()->cuePort(),0,0); diff --git a/lib/rdmblookup.cpp b/lib/rdmblookup.cpp index 495ed2d5..1c4a0491 100644 --- a/lib/rdmblookup.cpp +++ b/lib/rdmblookup.cpp @@ -65,7 +65,7 @@ RDMbLookup::RDMbLookup(const QString &caption,FILE *profile_msgs, { setWindowTitle(caption+" - MusicBrainz "+tr("Lookup")); - cover_art_default_icon=new QIcon(cover_art_default_60x60_xpm); + cover_art_default_icon=new QIcon(QPixmap(cover_art_default_60x60_xpm)); titlesBox()->setIconSize(QSize(60,60)); diff --git a/lib/rdpanel_button.cpp b/lib/rdpanel_button.cpp index 521cf018..a312396f 100644 --- a/lib/rdpanel_button.cpp +++ b/lib/rdpanel_button.cpp @@ -19,7 +19,8 @@ // -#include +#include +#include #include #include @@ -396,7 +397,7 @@ void RDPanelButton::mouseReleaseEvent(QMouseEvent *e) void RDPanelButton::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)&&button_allow_drags&& + if(RDCartDrag::canDecode(e->mimeData())&&button_allow_drags&& ((button_play_deck==NULL)||(button_play_deck->state()==RDPlayDeck::Stopped))) { e->accept(); } @@ -409,7 +410,7 @@ void RDPanelButton::dropEvent(QDropEvent *e) QColor color; QString title; - if(RDCartDrag::decode(e,&cartnum,&color,&title)) { + if(RDCartDrag::decode(e->mimeData(),&cartnum,&color,&title)) { emit cartDropped(button_row,button_col,cartnum,color,title); } } diff --git a/lib/rdripc.cpp b/lib/rdripc.cpp index d07b202c..6664c23e 100644 --- a/lib/rdripc.cpp +++ b/lib/rdripc.cpp @@ -221,12 +221,12 @@ void RDRipc::readyData() QString line=QString::fromUtf8(data); for(int i=0;i=0) { if(ret.mid(index+1,1)!="/n") { @@ -89,7 +89,7 @@ QByteArray __RDSendMail_EncodeBody(QString *charset,QString *encoding, QByteArray __RDSendMail_EncodeHeader(const QString &str) { if(__RDSendMail_IsAscii(str)) { - return str.toAscii(); + return str.toUtf8(); } return QByteArray("=?utf-8?B?")+str.toUtf8().toBase64()+"?="; } @@ -135,9 +135,9 @@ QByteArray __RDSendMail_EncodeAddress(const QString &str,bool *ok) // FIXME: Add support for IDNA (see RFC5891) // if(name.isEmpty()) { - return addr.toAscii(); + return addr.toUtf8(); } - return __RDSendMail_EncodeHeader(name)+" <"+addr.toAscii()+">"; + return __RDSendMail_EncodeHeader(name)+" <"+addr.toUtf8()+">"; } @@ -243,7 +243,7 @@ bool RDSendMail(QString *err_msg,const QString &subject,const QString &body, if(dry_run) { printf("*** MESSAGE STARTS ***\n"); - printf("%s",msg.toAscii().constData()); + printf("%s",msg.toUtf8().constData()); printf("*** MESSAGE ENDS ***\n"); return true; } diff --git a/lib/rdslotbox.cpp b/lib/rdslotbox.cpp index fb5ca9a0..08720da7 100644 --- a/lib/rdslotbox.cpp +++ b/lib/rdslotbox.cpp @@ -533,7 +533,7 @@ void RDSlotBox::paintEvent(QPaintEvent *e) void RDSlotBox::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)&& + if(RDCartDrag::canDecode(e->mimeData())&& (line_mode==RDSlotOptions::CartDeckMode)&& (line_deck->state()==RDPlayDeck::Stopped)) { e->accept(); @@ -545,7 +545,7 @@ void RDSlotBox::dropEvent(QDropEvent *e) { unsigned cartnum; - if(RDCartDrag::decode(e,&cartnum)) { + if(RDCartDrag::decode(e->mimeData(),&cartnum)) { emit cartDropped(cartnum); } } diff --git a/lib/rdsocketstrings.cpp b/lib/rdsocketstrings.cpp index 0456e96c..d6f51d92 100644 --- a/lib/rdsocketstrings.cpp +++ b/lib/rdsocketstrings.cpp @@ -2,7 +2,7 @@ // // Human-readable strings for QAbstractSocket::SocketError // -// (C) Copyright 2019 Fred Gleason +// (C) Copyright 2019-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -104,6 +104,22 @@ QString RDSocketStrings(QAbstractSocket::SocketError err) ret="proxy protocol error"; break; + case QAbstractSocket::OperationError: + ret="operation error"; + break; + + case QAbstractSocket::SslInternalError: + ret="SSL internal error"; + break; + + case QAbstractSocket::SslInvalidUserDataError: + ret="SSL invalid user data error"; + break; + + case QAbstractSocket::TemporaryError: + ret="temporary error"; + break; + case QAbstractSocket::UnknownSocketError: break; } diff --git a/lib/rdtimeedit.cpp b/lib/rdtimeedit.cpp index f741b7c3..256a7a7b 100644 --- a/lib/rdtimeedit.cpp +++ b/lib/rdtimeedit.cpp @@ -383,7 +383,7 @@ void RDTimeEdit::keyPressEvent(QKeyEvent *e) case Qt::Key_7: case Qt::Key_8: case Qt::Key_9: - ProcessKey(e->text().at(0).toAscii()); + ProcessNumericKey(e->text().left(1).toInt()); e->accept(); break; @@ -474,7 +474,7 @@ void RDTimeEdit::GetSizeHint() } -void RDTimeEdit::ProcessKey(int key) +void RDTimeEdit::ProcessNumericKey(int num) { int ten; @@ -483,7 +483,7 @@ void RDTimeEdit::ProcessKey(int key) case 1: case 2: if(edit_digit==0) { - edit_labels[edit_section]->setText(QString().sprintf("0%c",key)); + edit_labels[edit_section]->setText(QString().sprintf("0%d",num)); edit_digit=1; } else { @@ -491,12 +491,12 @@ void RDTimeEdit::ProcessKey(int key) if(ten>5) { ten=0; } - edit_labels[edit_section]->setText(QString().sprintf("%d%c",ten,key)); + edit_labels[edit_section]->setText(QString().sprintf("%d%d",ten,num)); } break; case 3: - edit_labels[3]->setText(QString().sprintf("%c",key)); + edit_labels[3]->setText(QString().sprintf("%d",num)); break; } emit valueChanged(time()); diff --git a/lib/rdtimeedit.h b/lib/rdtimeedit.h index a9d9d058..65257c43 100644 --- a/lib/rdtimeedit.h +++ b/lib/rdtimeedit.h @@ -64,7 +64,7 @@ class RDTimeEdit : public QFrame private: void GetSizeHint(); - void ProcessKey(int key); + void ProcessNumericKey(int num); QLabel *edit_labels[4]; QLabel *edit_sep_labels[3]; RDTransportButton *edit_up_button; diff --git a/lib/rdttydevice.cpp b/lib/rdttydevice.cpp index d23ee8b6..5c18cc4e 100644 --- a/lib/rdttydevice.cpp +++ b/lib/rdttydevice.cpp @@ -76,7 +76,7 @@ bool RDTTYDevice::open(QIODevice::OpenMode mode) flags|=O_TRUNC; } - if((tty_fd=::open(tty_name.toAscii(),flags))<0) { + if((tty_fd=::open(tty_name.toUtf8(),flags))<0) { return false; } tty_open=true; diff --git a/lib/rdwavefile.cpp b/lib/rdwavefile.cpp index 2662539e..b5fed93f 100644 --- a/lib/rdwavefile.cpp +++ b/lib/rdwavefile.cpp @@ -536,7 +536,7 @@ bool RDWaveFile::createWave(RDWaveData *data,unsigned ptr_offset) } prev_mask = umask(0113); // Set umask so files are user and group writable. rc=wave_file.open(QIODevice::ReadWrite|QIODevice::Truncate); - unlink((wave_file_name+".energy").toAscii()); + unlink((wave_file_name+".energy").toUtf8()); umask(prev_mask); if(rc==false) { return false; @@ -3452,7 +3452,7 @@ void RDWaveFile::ReadTmcTag(const QString tag,const QString value) wave_data->setMetadataFound(true); } if(tag=="END") { - wave_data->setEndType((RDWaveData::EndType)((char)value.at(0).toAscii())); + wave_data->setEndType((RDWaveData::EndType)((char)value.at(0).cell())); wave_data->setMetadataFound(true); } if(tag=="TMCIREF") { @@ -4422,31 +4422,31 @@ bool RDWaveFile::MakeCart(unsigned ptr_offset) CART_VERSION); if(!cart_title.isEmpty()) { sprintf((char *)cart_chunk_data+4,"%s", - cart_title.left(64).toAscii().constData()); + cart_title.left(64).toUtf8().constData()); } if(!cart_artist.isEmpty()) { sprintf((char *)cart_chunk_data+68,"%s", - cart_artist.left(64).toAscii().constData()); + cart_artist.left(64).toUtf8().constData()); } if(!cart_cut_id.isEmpty()) { sprintf((char *)cart_chunk_data+132,"%s", - cart_cut_id.left(64).toAscii().constData()); + cart_cut_id.left(64).toUtf8().constData()); } if(!cart_client_id.isEmpty()) { sprintf((char *)cart_chunk_data+196,"%s", - cart_client_id.left(64).toAscii().constData()); + cart_client_id.left(64).toUtf8().constData()); } if(!cart_category.isEmpty()) { sprintf((char *)cart_chunk_data+260,"%s", - cart_category.left(64).toAscii().constData()); + cart_category.left(64).toUtf8().constData()); } if(!cart_classification.isEmpty()) { sprintf((char *)cart_chunk_data+324,"%s", - cart_classification.left(64).toAscii().constData()); + cart_classification.left(64).toUtf8().constData()); } if(!cart_out_cue.isEmpty()) { sprintf((char *)cart_chunk_data+388,"%s", - cart_out_cue.left(64).toAscii().constData()); + cart_out_cue.left(64).toUtf8().constData()); } if(cart_start_date.isValid()) { sprintf((char *)cart_chunk_data+452,"%04d-%02d-%02d", @@ -4488,7 +4488,7 @@ bool RDWaveFile::MakeCart(unsigned ptr_offset) snprintf((char *)cart_chunk_data+552,64,"%s",VERSION); if(!cart_user_def.isEmpty()) { sprintf((char *)cart_chunk_data+616,"%s", - cart_user_def.left(64).toAscii().constData()); + cart_user_def.left(64).toUtf8().constData()); } WriteDword(cart_chunk_data,680,cart_level_ref); if(wave_data!=NULL) { @@ -4529,7 +4529,7 @@ bool RDWaveFile::MakeCart(unsigned ptr_offset) } if(!cart_url.isEmpty()) { sprintf((char *)cart_chunk_data+1020,"%s", - cart_url.left(1024).toAscii().constData()); + cart_url.left(1024).toUtf8().constData()); } return true; } @@ -4545,15 +4545,15 @@ bool RDWaveFile::MakeBext() } if(!bext_description.isEmpty()) { sprintf((char *)bext_coding_data,"%s", - bext_description.left(256).toAscii().constData()); + bext_description.left(256).toUtf8().constData()); } if(!bext_originator.isEmpty()) { sprintf((char *)bext_coding_data+256,"%s", - bext_originator.left(32).toAscii().constData()); + bext_originator.left(32).toUtf8().constData()); } if(!bext_originator_ref.isEmpty()) { sprintf((char *)bext_coding_data+288,"%s", - bext_originator_ref.left(32).toAscii().constData()); + bext_originator_ref.left(32).toUtf8().constData()); } sprintf((char *)bext_coding_data+320,"%04d-%02d-%02d", bext_origination_date.year(), @@ -4571,7 +4571,7 @@ bool RDWaveFile::MakeBext() } if(!bext_coding_history.isEmpty()) { sprintf((char *)bext_coding_data+602,"%s", - bext_coding_history.toAscii().constData()); + bext_coding_history.toUtf8().constData()); } return true; } @@ -4625,7 +4625,7 @@ bool RDWaveFile::MakeLevl() WriteDword(levl_chunk_data,24,levl_peak_offset); // Offset to Peak-of-Peaks WriteDword(levl_chunk_data,28,132); // Offset to Peak Data sprintf((char *)levl_chunk_data+32,"%s", - levl_timestamp.toString("yyyy:MM:dd:hh:mm:ss:000").toAscii(). + levl_timestamp.toString("yyyy:MM:dd:hh:mm:ss:000").toUtf8(). constData()); return true; diff --git a/lib/rdweb.cpp b/lib/rdweb.cpp index a3a99bfb..08162693 100644 --- a/lib/rdweb.cpp +++ b/lib/rdweb.cpp @@ -1158,7 +1158,7 @@ QString RDUrlUnescape(const QString &str) QString ret=""; for(int i=0;i #include #include @@ -838,7 +839,7 @@ void LogLineBox::paintEvent(QPaintEvent *e) void LogLineBox::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)&& + if(RDCartDrag::canDecode(e->mimeData())&& ((line_status==RDLogLine::Scheduled)|| (line_status==RDLogLine::Paused))) { e->accept(); @@ -850,7 +851,7 @@ void LogLineBox::dropEvent(QDropEvent *e) { RDLogLine ll; - if(RDCartDrag::decode(e,&ll)) { + if(RDCartDrag::decode(e->mimeData(),&ll)) { emit cartDropped(log_line,&ll); } } diff --git a/rdairplay/logtableview.cpp b/rdairplay/logtableview.cpp index 72ea7812..f85bec6b 100644 --- a/rdairplay/logtableview.cpp +++ b/rdairplay/logtableview.cpp @@ -33,7 +33,7 @@ LogTableView::LogTableView(QWidget *parent) void LogTableView::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)) { + if(RDCartDrag::canDecode(e->mimeData())) { e->accept(); } } @@ -41,7 +41,7 @@ void LogTableView::dragEnterEvent(QDragEnterEvent *e) void LogTableView::dragMoveEvent(QDragMoveEvent *e) { - if(RDCartDrag::canDecode(e)) { + if(RDCartDrag::canDecode(e->mimeData())) { e->accept(); } } @@ -53,7 +53,7 @@ void LogTableView::dropEvent(QDropEvent *e) int line=-1; int y_pos=e->pos().y(); - if(RDCartDrag::decode(e,&ll)) { + if(RDCartDrag::decode(e->mimeData(),&ll)) { line=rowAt(y_pos); emit cartDropped(line,&ll); } diff --git a/rdcartslots/Makefile.am b/rdcartslots/Makefile.am index bdb8c90b..2d656e15 100644 --- a/rdcartslots/Makefile.am +++ b/rdcartslots/Makefile.am @@ -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 MOC = @QT_MOC@ @@ -47,7 +47,7 @@ dist_rdcartslots_SOURCES = local_macros.cpp\ nodist_rdcartslots_SOURCES = moc_rdcartslots.cpp -rdcartslots_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcartslots_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdcartslots.pro\ rdcartslots_de.ts\ diff --git a/rdcastmanager/Makefile.am b/rdcastmanager/Makefile.am index 57260d8b..a8f64480 100644 --- a/rdcastmanager/Makefile.am +++ b/rdcastmanager/Makefile.am @@ -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 MOC = @QT_MOC@ @@ -55,7 +55,7 @@ nodist_rdcastmanager_SOURCES = moc_edit_cast.cpp\ moc_rdcastmanager.cpp\ moc_render_dialog.cpp -rdcastmanager_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcastmanager_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdcastmanager.pro\ rdcastmanager_cs.ts\ diff --git a/rdcatch/Makefile.am b/rdcatch/Makefile.am index 43390a2a..d0bb07d9 100644 --- a/rdcatch/Makefile.am +++ b/rdcatch/Makefile.am @@ -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 MOC = @QT_MOC@ @@ -74,7 +74,7 @@ nodist_rdcatch_SOURCES = moc_add_recording.cpp\ moc_vbox.cpp -rdcatch_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcatch_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdcatch.pro\ diff --git a/rdcatch/vbox.cpp b/rdcatch/vbox.cpp index 511d113e..9567e611 100644 --- a/rdcatch/vbox.cpp +++ b/rdcatch/vbox.cpp @@ -22,7 +22,7 @@ #include -VBox::VBox(QWidget *parent,Qt::WFlags f) +VBox::VBox(QWidget *parent,Qt::WindowFlags f) : QWidget(parent,f) { box_spacing=0; diff --git a/rdcatch/vbox.h b/rdcatch/vbox.h index 29022930..efc4ef6a 100644 --- a/rdcatch/vbox.h +++ b/rdcatch/vbox.h @@ -31,7 +31,7 @@ class VBox : public QWidget { Q_OBJECT public: - VBox(QWidget *parent=0,Qt::WFlags f=0); + VBox(QWidget *parent=0,Qt::WindowFlags f=0); void addWidget(QWidget *widget); void setSpacing(int space); diff --git a/rdcatchd/Makefile.am b/rdcatchd/Makefile.am index eb0e0d21..b08ed271 100644 --- a/rdcatchd/Makefile.am +++ b/rdcatchd/Makefile.am @@ -20,7 +20,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -39,7 +39,7 @@ dist_rdcatchd_SOURCES = batch.cpp\ nodist_rdcatchd_SOURCES = moc_event_player.cpp\ moc_rdcatchd.cpp -rdcatchd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcatchd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ moc_* diff --git a/rdcatchd/rdcatchd.cpp b/rdcatchd/rdcatchd.cpp index c5e52d4a..81ffa696 100644 --- a/rdcatchd/rdcatchd.cpp +++ b/rdcatchd/rdcatchd.cpp @@ -359,7 +359,7 @@ MainObject::MainObject(QObject *parent) connect(catch_engine,SIGNAL(timeout(int)),this,SLOT(engineData(int))); LoadEngine(); - if(qApp->argc()!=1) { + if(qApp->arguments().size()!=1) { debug=true; } @@ -1603,19 +1603,14 @@ void MainObject::ParseCommand(int ch) QString line=QString::fromUtf8(data); for(int i=0;iaccum=""; - break; - - case '\r': - case '\n': - break; - - default: + modified=true; + } + if((!modified)&&(c!=QChar('\r'))&&(c!=QChar('\n'))) { conn->accum+=c; - break; } } } @@ -2511,11 +2506,12 @@ QString MainObject::GetFileExtension(QString filename) } /* This is an overloaded virtual function to tell a session manager not to restart this daemon. */ +/* void QApplication::saveState(QSessionManager &sm) { sm.setRestartHint(QSessionManager::RestartNever); return; }; - +*/ bool MainObject::SendErrorMessage(CatchEvent *event,const QString &err_desc, QString rml) @@ -2679,9 +2675,9 @@ void MainObject::SendNotification(RDNotification::Type type, QString MainObject::GetTempRecordingName(int id) const { return QString().sprintf("%s/rdcatchd-record-%d.%s", - RDConfiguration()->audioRoot().toAscii().constData(), + RDConfiguration()->audioRoot().toUtf8().constData(), id, - RDConfiguration()->audioExtension().toAscii(). + RDConfiguration()->audioExtension().toUtf8(). constData()); } diff --git a/rdhpi/Makefile.am b/rdhpi/Makefile.am index 494ed278..6e18e23a 100644 --- a/rdhpi/Makefile.am +++ b/rdhpi/Makefile.am @@ -21,7 +21,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ CWRAP = ../helpers/cwrap diff --git a/rdlibrary/Makefile.am b/rdlibrary/Makefile.am index 7ee41332..6cb660f5 100644 --- a/rdlibrary/Makefile.am +++ b/rdlibrary/Makefile.am @@ -20,7 +20,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -75,7 +75,7 @@ nodist_rdlibrary_SOURCES = moc_audio_cart.cpp\ moc_rdlibrary.cpp\ moc_record_cut.cpp -rdlibrary_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdlibrary_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdlibrary.pro\ rdlibrary_cs.ts\ diff --git a/rdlogedit/Makefile.am b/rdlogedit/Makefile.am index 75ed0b38..fff02f69 100644 --- a/rdlogedit/Makefile.am +++ b/rdlogedit/Makefile.am @@ -2,7 +2,7 @@ ## ## Use automake to process this into a Makefile.in ## -## (C) Copyright 2002-2020 Fred Gleason +## (C) Copyright 2002-2021 Fred Gleason ## ## 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 @@ -18,7 +18,7 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ## -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 MOC = @QT_MOC@ @@ -68,7 +68,7 @@ nodist_rdlogedit_SOURCES = moc_add_meta.cpp\ moc_render_dialog.cpp\ moc_voice_tracker.cpp -rdlogedit_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdlogedit_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdlogedit.pro\ rdlogedit_cs.ts\ diff --git a/rdlogedit/logtableview.cpp b/rdlogedit/logtableview.cpp index cf1cc106..14132a03 100644 --- a/rdlogedit/logtableview.cpp +++ b/rdlogedit/logtableview.cpp @@ -52,7 +52,7 @@ LogTableView::LogTableView(QWidget *parent) void LogTableView::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)) { + if(RDCartDrag::canDecode(e->mimeData())) { e->accept(); } } @@ -60,7 +60,7 @@ void LogTableView::dragEnterEvent(QDragEnterEvent *e) void LogTableView::dragMoveEvent(QDragMoveEvent *e) { - if(RDCartDrag::canDecode(e)) { + if(RDCartDrag::canDecode(e->mimeData())) { e->accept(); } } @@ -72,7 +72,7 @@ void LogTableView::dropEvent(QDropEvent *e) int line=-1; int y_pos=e->pos().y(); - if(RDCartDrag::decode(e,&ll)) { + if(RDCartDrag::decode(e->mimeData(),&ll)) { line=rowAt(y_pos); emit cartDropped(line,&ll); } diff --git a/rdlogedit/voice_tracker.cpp b/rdlogedit/voice_tracker.cpp index 14d3f0a5..ecc723d1 100644 --- a/rdlogedit/voice_tracker.cpp +++ b/rdlogedit/voice_tracker.cpp @@ -37,7 +37,10 @@ VoiceTracker::VoiceTracker(const QString &logname,QString *import_path, QWidget *parent) : RDDialog(parent) { - setAttribute(Qt::WA_PaintOutsidePaintEvent); + // + // FIXME + // + // setAttribute(Qt::WA_PaintOutsidePaintEvent); d_import_path=import_path; d_coding=RDCae::Pcm16; diff --git a/rdlogin/Makefile.am b/rdlogin/Makefile.am index 117e8596..2ef5dec2 100644 --- a/rdlogin/Makefile.am +++ b/rdlogin/Makefile.am @@ -18,7 +18,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 MOC = @QT_MOC@ @@ -44,7 +44,7 @@ dist_rdlogin_SOURCES = rdlogin.cpp rdlogin.h nodist_rdlogin_SOURCES = moc_rdlogin.cpp -rdlogin_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdlogin_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdlogin.pro\ rdlogin_cs.ts\ diff --git a/rdlogmanager/Makefile.am b/rdlogmanager/Makefile.am index bb5692d6..55644cc2 100644 --- a/rdlogmanager/Makefile.am +++ b/rdlogmanager/Makefile.am @@ -18,7 +18,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 MOC = @QT_MOC@ @@ -103,7 +103,7 @@ nodist_rdlogmanager_SOURCES = moc_add_clock.cpp\ moc_svc_rec_dialog.cpp\ moc_viewreportdialog.cpp -rdlogmanager_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdlogmanager_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdlogmanager.pro\ rdlogmanager_cs.ts\ diff --git a/rdlogmanager/importcartsview.cpp b/rdlogmanager/importcartsview.cpp index cb3f3dd4..c7537298 100644 --- a/rdlogmanager/importcartsview.cpp +++ b/rdlogmanager/importcartsview.cpp @@ -215,7 +215,7 @@ void ImportCartsView::setSegueData() void ImportCartsView::dragEnterEvent(QDragEnterEvent *e) { - if(RDCartDrag::canDecode(e)) { + if(RDCartDrag::canDecode(e->mimeData())) { e->accept(); } } @@ -232,7 +232,7 @@ void ImportCartsView::dropEvent(QDropEvent *e) int line=-1; int y_pos=e->pos().y(); - if(RDCartDrag::decode(e,&ll)) { + if(RDCartDrag::decode(e->mimeData(),&ll)) { line=rowAt(y_pos); emit cartDropped(line,&ll); } diff --git a/rdmonitor/Makefile.am b/rdmonitor/Makefile.am index 5d128426..fca22c72 100644 --- a/rdmonitor/Makefile.am +++ b/rdmonitor/Makefile.am @@ -18,7 +18,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 MOC = @QT_MOC@ @@ -46,7 +46,7 @@ dist_rdmonitor_SOURCES = positiondialog.cpp positiondialog.h\ nodist_rdmonitor_SOURCES = moc_positiondialog.cpp\ moc_rdmonitor.cpp -rdmonitor_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdmonitor_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdmonitor.pro\ rdmonitor_cs.ts\ diff --git a/rdmonitor/rdmonitor.cpp b/rdmonitor/rdmonitor.cpp index 9f5b4e63..583171a4 100644 --- a/rdmonitor/rdmonitor.cpp +++ b/rdmonitor/rdmonitor.cpp @@ -61,7 +61,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) // // Read Command Options // - RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdmonitor","\n"); + RDCmdSwitch *cmd=new RDCmdSwitch("rdmonitor","\n"); delete cmd; // diff --git a/rdpadd/Makefile.am b/rdpadd/Makefile.am index ec9b2d2e..b228558d 100644 --- a/rdpadd/Makefile.am +++ b/rdpadd/Makefile.am @@ -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@ @@ -35,7 +35,7 @@ dist_rdpadd_SOURCES = rdpadd.cpp rdpadd.h nodist_rdpadd_SOURCES = moc_rdpadd.cpp -rdpadd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdpadd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/rdpadd/rdpadd.cpp b/rdpadd/rdpadd.cpp index 637a66a0..81af9e6c 100644 --- a/rdpadd/rdpadd.cpp +++ b/rdpadd/rdpadd.cpp @@ -2,7 +2,7 @@ // // Rivendell PAD Consolidation Server // -// (C) Copyright 2018-2019 Fred Gleason +// (C) Copyright 2018-2021 Fred Gleason // // 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 @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -73,7 +73,7 @@ QTcpSocket *MetadataSource::socket() const MainObject::MainObject(QObject *parent) : QObject(parent) { - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdpadd",RDPADD_USAGE); + new RDCmdSwitch("rdpadd",RDPADD_USAGE); // // Client Server diff --git a/rdpadengined/Makefile.am b/rdpadengined/Makefile.am index 3164e8ef..4d9d1920 100644 --- a/rdpadengined/Makefile.am +++ b/rdpadengined/Makefile.am @@ -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@ @@ -35,7 +35,7 @@ dist_rdpadengined_SOURCES = rdpadengined.cpp rdpadengined.h nodist_rdpadengined_SOURCES = moc_rdpadengined.cpp -rdpadengined_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdpadengined_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/rdpanel/Makefile.am b/rdpanel/Makefile.am index c5a0c952..c930ac9a 100644 --- a/rdpanel/Makefile.am +++ b/rdpanel/Makefile.am @@ -18,7 +18,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 MOC = @QT_MOC@ @@ -45,7 +45,7 @@ dist_rdpanel_SOURCES = globals.h\ nodist_rdpanel_SOURCES = moc_rdpanel.cpp -rdpanel_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdpanel_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdpanel.pro\ rdpanel_cs.ts\ diff --git a/rdrepld/Makefile.am b/rdrepld/Makefile.am index 5f851a17..6c5e3ee1 100644 --- a/rdrepld/Makefile.am +++ b/rdrepld/Makefile.am @@ -18,7 +18,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -32,7 +32,7 @@ dist_rdrepld_SOURCES = rdrepld.cpp rdrepld.h \ replfactory.cpp replfactory.h\ citadelxds.cpp citadelxds.h nodist_rdrepld_SOURCES = moc_rdrepld.cpp -rdrepld_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdrepld_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~ moc_* DISTCLEANFILES = moc_* diff --git a/rdrepld/citadelxds.cpp b/rdrepld/citadelxds.cpp index a6597a33..b6b24438 100644 --- a/rdrepld/citadelxds.cpp +++ b/rdrepld/citadelxds.cpp @@ -152,8 +152,8 @@ bool CitadelXds::LoadIsciXreference(const QString &filename) if(ok&&(cartnum<=RD_MAX_CART_NUMBER)) { datelist=fields[6].split("/"); if(datelist.size()==3) { - date.setYMD(datelist[2].toInt()+2000,datelist[0].toInt(), - datelist[1].toInt()); + date.setDate(datelist[2].toInt()+2000,datelist[0].toInt(), + datelist[1].toInt()); if(ValidateFilename(fields[8])) { if(date.isValid()) { sql=QString("insert into ISCI_XREFERENCE set ")+ diff --git a/rdrepld/rdrepld.cpp b/rdrepld/rdrepld.cpp index d2709ceb..0b1498c8 100644 --- a/rdrepld/rdrepld.cpp +++ b/rdrepld/rdrepld.cpp @@ -100,7 +100,7 @@ MainObject::MainObject(QObject *parent) // SIGNAL(logText(RDConfig::LogPriority,const QString &)), // this,SLOT(log(RDConfig::LogPriority,const QString &))); - if(qApp->argc()!=1) { + if(qApp->arguments().size()!=1) { debug=true; } diff --git a/rdrssd/Makefile.am b/rdrssd/Makefile.am index 0ea295c0..ae28e7f2 100644 --- a/rdrssd/Makefile.am +++ b/rdrssd/Makefile.am @@ -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@ @@ -35,7 +35,7 @@ dist_rdrssd_SOURCES = rdrssd.cpp rdrssd.h nodist_rdrssd_SOURCES = moc_rdrssd.cpp -rdrssd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdrssd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/rdselect/Makefile.am b/rdselect/Makefile.am index 0b8093fb..7a4f7a72 100644 --- a/rdselect/Makefile.am +++ b/rdselect/Makefile.am @@ -18,7 +18,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 MOC = @QT_MOC@ @@ -48,7 +48,7 @@ dist_rdselect_SOURCES = rdselect.cpp rdselect.h nodist_rdselect_SOURCES = moc_rdselect.cpp -rdselect_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdselect_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rd.audiostore.autofs\ rdselect.pro\ diff --git a/rdselect/rdselect.cpp b/rdselect/rdselect.cpp index 6ca81da0..0ab04dfa 100644 --- a/rdselect/rdselect.cpp +++ b/rdselect/rdselect.cpp @@ -44,7 +44,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent) // // Read Command Options // - RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdselect","\n"); + RDCmdSwitch *cmd=new RDCmdSwitch("rdselect","\n"); delete cmd; // diff --git a/rdservice/Makefile.am b/rdservice/Makefile.am index 16a25fe2..b0e85b3b 100644 --- a/rdservice/Makefile.am +++ b/rdservice/Makefile.am @@ -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 MOC = @QT_MOC@ @@ -38,7 +38,7 @@ dist_rdservice_SOURCES = maint_routines.cpp\ nodist_rdservice_SOURCES = moc_rdservice.cpp -rdservice_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdservice_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ moc_* diff --git a/rdvairplayd/Makefile.am b/rdvairplayd/Makefile.am index fd91f938..d6e368b6 100644 --- a/rdvairplayd/Makefile.am +++ b/rdvairplayd/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -32,7 +32,7 @@ dist_rdvairplayd_SOURCES = local_macros.cpp\ nodist_rdvairplayd_SOURCES = moc_rdvairplayd.cpp -rdvairplayd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdvairplayd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/ripcd/Makefile.am b/ripcd/Makefile.am index 64bde41e..6c2bcff4 100644 --- a/ripcd/Makefile.am +++ b/ripcd/Makefile.am @@ -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@ diff --git a/ripcd/gvc7000.cpp b/ripcd/gvc7000.cpp index 81924825..cf14769b 100644 --- a/ripcd/gvc7000.cpp +++ b/ripcd/gvc7000.cpp @@ -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;icae()->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;iaccum=""; } else { - if((c.toAscii()!='\r')&&(c.toAscii()!='\n')) { + if((c!=QChar('\r'))&&(c!=QChar('\n'))) { conn->accum+=c; } } diff --git a/tests/Makefile.am b/tests/Makefile.am index ac5e2eaa..3e359087 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -18,7 +18,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -55,90 +55,90 @@ noinst_PROGRAMS = audio_convert_test\ wav_chunk_test dist_audio_convert_test_SOURCES = audio_convert_test.cpp audio_convert_test.h -audio_convert_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +audio_convert_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_audio_export_test_SOURCES = audio_export_test.cpp audio_export_test.h -audio_export_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +audio_export_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_audio_import_test_SOURCES = audio_import_test.cpp audio_import_test.h -audio_import_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +audio_import_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_audio_metadata_test_SOURCES = audio_metadata_test.cpp audio_metadata_test.h -audio_metadata_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +audio_metadata_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_audio_peaks_test_SOURCES = audio_peaks_test.cpp audio_peaks_test.h -audio_peaks_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +audio_peaks_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_cmdline_parser_test_SOURCES = cmdline_parser_test.cpp cmdline_parser_test.h -cmdline_parser_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +cmdline_parser_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_datedecode_test_SOURCES = datedecode_test.cpp datedecode_test.h -datedecode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +datedecode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_dateparse_test_SOURCES = dateparse_test.cpp dateparse_test.h -dateparse_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +dateparse_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_db_charset_test_SOURCES = db_charset_test.cpp db_charset_test.h -db_charset_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +db_charset_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_delete_test_SOURCES = delete_test.cpp delete_test.h -delete_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +delete_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_download_test_SOURCES = download_test.cpp download_test.h -download_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +download_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_feed_image_test_SOURCES = feed_image_test.cpp feed_image_test.h -feed_image_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +feed_image_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_getpids_test_SOURCES = getpids_test.cpp getpids_test.h -getpids_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +getpids_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_log_unlink_test_SOURCES = log_unlink_test.cpp log_unlink_test.h nodist_log_unlink_test_SOURCES = moc_log_unlink_test.cpp -log_unlink_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +log_unlink_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_metadata_wildcard_test_SOURCES = metadata_wildcard_test.cpp metadata_wildcard_test.h nodist_metadata_wildcard_test_SOURCES = moc_metadata_wildcard_test.cpp -metadata_wildcard_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +metadata_wildcard_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_mcast_recv_test_SOURCES = mcast_recv_test.cpp mcast_recv_test.h nodist_mcast_recv_test_SOURCES = moc_mcast_recv_test.cpp -mcast_recv_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +mcast_recv_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_notification_test_SOURCES = notification_test.cpp notification_test.h nodist_notification_test_SOURCES = moc_notification_test.cpp -notification_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +notification_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_rdxml_parse_test_SOURCES = rdxml_parse_test.cpp rdxml_parse_test.h -rdxml_parse_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdxml_parse_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_readcd_test_SOURCES = readcd_test.cpp readcd_test.h -readcd_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +readcd_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_reserve_carts_test_SOURCES = reserve_carts_test.cpp reserve_carts_test.h -reserve_carts_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +reserve_carts_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_sendmail_test_SOURCES = sendmail_test.cpp sendmail_test.h -sendmail_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +sendmail_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_stringcode_test_SOURCES = stringcode_test.cpp stringcode_test.h -stringcode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +stringcode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_test_hash_SOURCES = test_hash.cpp test_hash.h -test_hash_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +test_hash_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_test_pam_SOURCES = test_pam.cpp test_pam.h -test_pam_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +test_pam_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_timer_test_SOURCES = timer_test.cpp timer_test.h nodist_timer_test_SOURCES = moc_timer_test.cpp -timer_test_LDADD = @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +timer_test_LDADD = @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_upload_test_SOURCES = upload_test.cpp upload_test.h -upload_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +upload_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ dist_wav_chunk_test_SOURCES = wav_chunk_test.cpp wav_chunk_test.h -wav_chunk_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +wav_chunk_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rivendell_standard.txt\ visualtraffic.txt diff --git a/tests/audio_peaks_test.cpp b/tests/audio_peaks_test.cpp index ec1786e5..c54f9b75 100644 --- a/tests/audio_peaks_test.cpp +++ b/tests/audio_peaks_test.cpp @@ -36,9 +36,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"audio_peaks_test", - AUDIO_PEAKS_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("audio_peaks_test",AUDIO_PEAKS_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--filename") { filename=cmd->value(i); diff --git a/tests/cmdline_parser_test.cpp b/tests/cmdline_parser_test.cpp index 82a9180c..f93608a1 100644 --- a/tests/cmdline_parser_test.cpp +++ b/tests/cmdline_parser_test.cpp @@ -34,8 +34,7 @@ MainObject::MainObject(QObject *parent) // Read Command Options // RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"cmdline_parser_test", - CMDLINE_PARSER_TEST_USAGE); + new RDCmdSwitch("cmdline_parser_test",CMDLINE_PARSER_TEST_USAGE); for(unsigned i=0;ikeys();i++) { printf(" key[%d]: %s\n",i,cmd->key(i).toUtf8().constData()); printf("value[%d]: %s\n",i,cmd->value(i).toUtf8().constData()); diff --git a/tests/datedecode_test.cpp b/tests/datedecode_test.cpp index 37f4e067..9cfdaf76 100644 --- a/tests/datedecode_test.cpp +++ b/tests/datedecode_test.cpp @@ -37,9 +37,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"datedecode_test", - DATEDECODE_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("datedecode_test",DATEDECODE_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--date") { date=cmd->value(i); @@ -81,7 +79,7 @@ MainObject::MainObject(QObject *parent) // QString err (tr("datedecode_test: ")); if(!RDOpenDb(&schema,&err,config)) { - fprintf(stderr,err.toAscii()); + fprintf(stderr,err.toUtf8()); delete cmd; exit(256); } diff --git a/tests/dateparse_test.cpp b/tests/dateparse_test.cpp index 67239f4e..6219e1c4 100644 --- a/tests/dateparse_test.cpp +++ b/tests/dateparse_test.cpp @@ -37,9 +37,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"dateparse_test", - DATEPARSE_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("dateparse_test",DATEPARSE_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--datetime") { datetime=cmd->value(i); diff --git a/tests/db_charset_test.cpp b/tests/db_charset_test.cpp index 8522c06e..453579ce 100644 --- a/tests/db_charset_test.cpp +++ b/tests/db_charset_test.cpp @@ -30,9 +30,7 @@ MainObject::MainObject(QObject *parent) QString err_msg; QString sql; RDSqlQuery *q; - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"db_charset_test", - DB_CHARSET_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("db_charset_test",DB_CHARSET_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(!cmd->processed(i)) { fprintf(stderr,"db_charset_test: unknown option \"%s\"\n", diff --git a/tests/getpids_test.cpp b/tests/getpids_test.cpp index a187deb2..ad81f4f7 100644 --- a/tests/getpids_test.cpp +++ b/tests/getpids_test.cpp @@ -36,9 +36,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"getpids_test", - GETPIDS_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("getpids_test",GETPIDS_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--program") { program=cmd->value(i); diff --git a/tests/log_unlink_test.cpp b/tests/log_unlink_test.cpp index 6205545d..d0165a08 100644 --- a/tests/log_unlink_test.cpp +++ b/tests/log_unlink_test.cpp @@ -39,9 +39,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"log_unlink_test", - LOG_UNLINK_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("log_unlink_test",LOG_UNLINK_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--log") { test_log_name=cmd->value(i); @@ -86,7 +84,7 @@ MainObject::MainObject(QObject *parent) // QString err (tr("upload_test: ")); if(!RDOpenDb(&schema,&err,test_config)) { - fprintf(stderr,err.toAscii()); + fprintf(stderr,err.toUtf8()); delete cmd; exit(256); } diff --git a/tests/mcast_recv_test.cpp b/tests/mcast_recv_test.cpp index 318b424d..5578ee71 100644 --- a/tests/mcast_recv_test.cpp +++ b/tests/mcast_recv_test.cpp @@ -32,9 +32,7 @@ MainObject::MainObject(QObject *parent) unsigned from_port=0; bool ok=false; - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"mcast_recv_test", - MCAST_RECV_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("mcast_recv_test",MCAST_RECV_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--from") { QStringList f0=cmd->value(i).split(":"); diff --git a/tests/rdxml_parse_test.cpp b/tests/rdxml_parse_test.cpp index cf516222..aaf35d09 100644 --- a/tests/rdxml_parse_test.cpp +++ b/tests/rdxml_parse_test.cpp @@ -38,9 +38,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdxml_parse_test", - RDXML_PARSE_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rdxml_parse_test",RDXML_PARSE_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--filename") { filename=cmd->value(i); diff --git a/tests/readcd_test.cpp b/tests/readcd_test.cpp index 8d5b8375..aa633dc9 100644 --- a/tests/readcd_test.cpp +++ b/tests/readcd_test.cpp @@ -36,9 +36,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"readcd_test", - READCD_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("readcd_test",READCD_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--device") { device=cmd->value(i); diff --git a/tests/reserve_carts_test.cpp b/tests/reserve_carts_test.cpp index 7126500f..221ffa73 100644 --- a/tests/reserve_carts_test.cpp +++ b/tests/reserve_carts_test.cpp @@ -42,8 +42,7 @@ MainObject::MainObject(QObject *parent) // Read Command Options // RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"reserve_carts_test", - RESERVE_CARTS_TEST_USAGE); + new RDCmdSwitch("reserve_carts_test",RESERVE_CARTS_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--group") { group_name=cmd->value(i); @@ -88,7 +87,7 @@ MainObject::MainObject(QObject *parent) // QString err (tr("upload_test: ")); if(!RDOpenDb(&schema,&err,config)) { - fprintf(stderr,err.toAscii()); + fprintf(stderr,err.toUtf8()); delete cmd; exit(256); } diff --git a/tests/sendmail_test.cpp b/tests/sendmail_test.cpp index 1f8f19ab..725c41e4 100644 --- a/tests/sendmail_test.cpp +++ b/tests/sendmail_test.cpp @@ -47,9 +47,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"sendmail_test", - SENDMAIL_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("sendmail_test",SENDMAIL_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--from-addr") { from_addr=cmd->value(i); diff --git a/tests/stringcode_test.cpp b/tests/stringcode_test.cpp index fbab08cb..1a88bca6 100644 --- a/tests/stringcode_test.cpp +++ b/tests/stringcode_test.cpp @@ -38,9 +38,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"stringcode_test", - STRINGCODE_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("stringcode_test",STRINGCODE_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--xml-encode") { xml_encode=true; diff --git a/tests/test_hash.cpp b/tests/test_hash.cpp index cffc5418..68bd25a4 100644 --- a/tests/test_hash.cpp +++ b/tests/test_hash.cpp @@ -36,8 +36,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"test_hash",TEST_HASH_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("test_hash",TEST_HASH_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--filename") { filename=cmd->value(i); diff --git a/tests/test_pam.cpp b/tests/test_pam.cpp index 52dba3e3..f48ee387 100644 --- a/tests/test_pam.cpp +++ b/tests/test_pam.cpp @@ -77,8 +77,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"test_pam",TEST_PAM_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("test_pam",TEST_PAM_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--service-name") { service_name=cmd->value(i); diff --git a/tests/wav_chunk_test.cpp b/tests/wav_chunk_test.cpp index 745c5dcb..bf722ddb 100644 --- a/tests/wav_chunk_test.cpp +++ b/tests/wav_chunk_test.cpp @@ -47,9 +47,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"wav_chunk_test", - WAV_CHUNK_TEST_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("wav_chunk_test",WAV_CHUNK_TEST_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--filename") { filename=cmd->value(i); diff --git a/utils/rdalsaconfig/Makefile.am b/utils/rdalsaconfig/Makefile.am index 34d3dd05..34015e0c 100644 --- a/utils/rdalsaconfig/Makefile.am +++ b/utils/rdalsaconfig/Makefile.am @@ -18,7 +18,7 @@ ## Use automake to process this into a Makefile.in ## -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi MOC = @QT_MOC@ @@ -36,7 +36,7 @@ dist_rdalsaconfig_SOURCES = alsaitem.cpp alsaitem.h\ nodist_rdalsaconfig_SOURCES = moc_rdalsamodel.cpp\ moc_rdalsaconfig.cpp -rdalsaconfig_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @LIBALSA@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdalsaconfig_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @LIBALSA@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdalsaconfig.pro diff --git a/utils/rdcheckcuts/Makefile.am b/utils/rdcheckcuts/Makefile.am index c364d722..32e216ed 100644 --- a/utils/rdcheckcuts/Makefile.am +++ b/utils/rdcheckcuts/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -29,7 +29,7 @@ bin_PROGRAMS = rdcheckcuts dist_rdcheckcuts_SOURCES = rdcheckcuts.cpp rdcheckcuts.h -rdcheckcuts_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcheckcuts_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdcleandirs/Makefile.am b/utils/rdcleandirs/Makefile.am index 922bcf4a..df7b8bda 100644 --- a/utils/rdcleandirs/Makefile.am +++ b/utils/rdcleandirs/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -29,7 +29,7 @@ sbin_PROGRAMS = rdcleandirs dist_rdcleandirs_SOURCES = rdcleandirs.cpp rdcleandirs.h -rdcleandirs_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcleandirs_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.exe\ diff --git a/utils/rdcleandirs/rdcleandirs.cpp b/utils/rdcleandirs/rdcleandirs.cpp index 8cbc9b41..a44c5e79 100644 --- a/utils/rdcleandirs/rdcleandirs.cpp +++ b/utils/rdcleandirs/rdcleandirs.cpp @@ -40,8 +40,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcleandirs",RDCLEANDIRS_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rdcleandirs",RDCLEANDIRS_USAGE); for(unsigned i=0;ikeys();i++) { } if(!cmd->allProcessed()) { diff --git a/utils/rdclilogedit/Makefile.am b/utils/rdclilogedit/Makefile.am index 70c0d55f..c845fb42 100644 --- a/utils/rdclilogedit/Makefile.am +++ b/utils/rdclilogedit/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -34,7 +34,7 @@ dist_rdclilogedit_SOURCES = help.cpp\ nodist_rdclilogedit_SOURCES = moc_rdclilogedit.cpp -rdclilogedit_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdclilogedit_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdcollect/Makefile.am b/utils/rdcollect/Makefile.am index 6dd92573..98a3f160 100644 --- a/utils/rdcollect/Makefile.am +++ b/utils/rdcollect/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -29,7 +29,7 @@ bin_PROGRAMS = rdcollect dist_rdcollect_SOURCES = rdcollect.cpp rdcollect.h -rdcollect_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdcollect_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.exe\ diff --git a/utils/rdcollect/rdcollect.cpp b/utils/rdcollect/rdcollect.cpp index 43fe0206..3573ffb7 100644 --- a/utils/rdcollect/rdcollect.cpp +++ b/utils/rdcollect/rdcollect.cpp @@ -42,8 +42,7 @@ MainObject::MainObject(QObject *parent) // // Read Command Options // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcollect",RDCOLLECT_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rdcollect",RDCOLLECT_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--source-file") { source_files.push_back(cmd->value(i)); diff --git a/utils/rdconvert/Makefile.am b/utils/rdconvert/Makefile.am index 0e6d91f3..54062e8d 100644 --- a/utils/rdconvert/Makefile.am +++ b/utils/rdconvert/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -29,7 +29,7 @@ bin_PROGRAMS = rdconvert dist_rdconvert_SOURCES = rdconvert.cpp rdconvert.h -rdconvert_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdconvert_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.exe\ diff --git a/utils/rddbconfig/Makefile.am b/utils/rddbconfig/Makefile.am index dc545cde..1e10b246 100644 --- a/utils/rddbconfig/Makefile.am +++ b/utils/rddbconfig/Makefile.am @@ -18,7 +18,7 @@ ## Use automake to process this into a Makefile.in ## -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib -I$(top_srcdir)/rdhpi @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib -L$(top_srcdir)/rdhpi MOC = @QT_MOC@ @@ -33,7 +33,7 @@ dist_rddbconfig_SOURCES = rddbconfig.cpp rddbconfig.h mysql_login.cpp mysql_logi nodist_rddbconfig_SOURCES = moc_rddbconfig.cpp moc_mysql_login.cpp -rddbconfig_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @LIBALSA@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rddbconfig_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @LIBALSA@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.qm\ diff --git a/utils/rddbmgr/Makefile.am b/utils/rddbmgr/Makefile.am index bea833fa..3c77ba40 100644 --- a/utils/rddbmgr/Makefile.am +++ b/utils/rddbmgr/Makefile.am @@ -17,7 +17,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -fno-var-tracking-assignments -DPREFIX=\"$(prefix)\" -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -fno-var-tracking-assignments -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC -I$(top_srcdir)/lib @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@ LIBS = -L$(top_srcdir)/lib MOC = @QT_MOC@ @@ -36,7 +36,7 @@ dist_rddbmgr_SOURCES = check.cpp\ schemamap.cpp\ updateschema.cpp -rddbmgr_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rddbmgr_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.exe\ diff --git a/utils/rddbmgr/create.cpp b/utils/rddbmgr/create.cpp index ef5fc49a..4aed7d59 100644 --- a/utils/rddbmgr/create.cpp +++ b/utils/rddbmgr/create.cpp @@ -2483,8 +2483,8 @@ bool MainObject::InititalizeNewDb(const QString &station_name,bool gen_audio, if(gen_audio) { QString filename= QString().sprintf("%s/999999_001.%s", - RDConfiguration()->audioRoot().toAscii().constData(), - RDConfiguration()->audioExtension().toAscii(). + RDConfiguration()->audioRoot().toUtf8().constData(), + RDConfiguration()->audioExtension().toUtf8(). constData()); QString cmd=QString().sprintf("rdgen -t 10 -l 16 %s", diff --git a/utils/rddbmgr/rddbmgr.cpp b/utils/rddbmgr/rddbmgr.cpp index ba5b1f91..00d9235f 100644 --- a/utils/rddbmgr/rddbmgr.cpp +++ b/utils/rddbmgr/rddbmgr.cpp @@ -85,8 +85,7 @@ MainObject::MainObject(QObject *parent) // // Process Command Switches // - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rddbmgr",RDDBMGR_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rddbmgr",RDDBMGR_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--check") { MainObject::Command command=MainObject::CheckCommand; diff --git a/utils/rddelete/Makefile.am b/utils/rddelete/Makefile.am index 1ee3a21e..3bda32ef 100644 --- a/utils/rddelete/Makefile.am +++ b/utils/rddelete/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rddelete_SOURCES = rddelete.cpp rddelete.h nodist_rddelete_SOURCES = moc_rddelete.cpp -rddelete_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rddelete_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rddelete/rddelete.cpp b/utils/rddelete/rddelete.cpp index 5554f7f1..1a2e640c 100644 --- a/utils/rddelete/rddelete.cpp +++ b/utils/rddelete/rddelete.cpp @@ -32,7 +32,7 @@ MainObject::MainObject(QObject *parent) { QString err_msg; - int obj_start=qApp->argc(); + int obj_start=qApp->arguments().size(); del_carts=false; del_logs=false; del_verbose=false; @@ -96,8 +96,8 @@ MainObject::MainObject(QObject *parent) // // Read Object List // - for(int i=obj_start;iargc();i++) { - del_obj_ids.push_back(qApp->argv()[i]); + for(int i=obj_start;iarguments().size();i++) { + del_obj_ids.push_back(qApp->arguments().at(i)); if((del_obj_ids.back()=="--carts")||(del_obj_ids.back()=="--logs")) { fprintf(stderr, "rddelete: --carts and --logs switches are mutually exclusive\n"); diff --git a/utils/rddgimport/Makefile.am b/utils/rddgimport/Makefile.am index 62e35986..642aead6 100644 --- a/utils/rddgimport/Makefile.am +++ b/utils/rddgimport/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -44,7 +44,7 @@ dist_rddgimport_SOURCES = event.cpp event.h\ nodist_rddgimport_SOURCES = moc_rddgimport.cpp -rddgimport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rddgimport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rddgimport.pro\ rddgimport_de.ts\ diff --git a/utils/rdexport/Makefile.am b/utils/rdexport/Makefile.am index 35cd3141..58d2ea67 100644 --- a/utils/rdexport/Makefile.am +++ b/utils/rdexport/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdexport_SOURCES = rdexport.cpp rdexport.h nodist_rdexport_SOURCES = moc_rdexport.cpp -rdexport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdexport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdgpimon/Makefile.am b/utils/rdgpimon/Makefile.am index 9a0cc0f2..e6cd0d80 100644 --- a/utils/rdgpimon/Makefile.am +++ b/utils/rdgpimon/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -45,7 +45,7 @@ dist_rdgpimon_SOURCES = gpi_label.cpp gpi_label.h\ nodist_rdgpimon_SOURCES = moc_gpi_label.cpp\ moc_rdgpimon.cpp -rdgpimon_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdgpimon_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdgpimon.pro\ rdgpimon_cs.ts\ diff --git a/utils/rdimport/Makefile.am b/utils/rdimport/Makefile.am index b5b9a682..1ca84491 100644 --- a/utils/rdimport/Makefile.am +++ b/utils/rdimport/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -33,7 +33,7 @@ dist_rdimport_SOURCES = journal.cpp journal.h\ nodist_rdimport_SOURCES = moc_rdimport.cpp -rdimport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdimport_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdimport/rdimport.cpp b/utils/rdimport/rdimport.cpp index 1cd50711..46319c58 100644 --- a/utils/rdimport/rdimport.cpp +++ b/utils/rdimport/rdimport.cpp @@ -1836,7 +1836,7 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename, if(macro_active) { if((i==filename.length())|| ((!delimiter.isNull())&&(filename.at(i)==delimiter))) { - switch(field.toAscii()) { + switch(field.cell()) { case 'a': wavedata->setArtist(value); wavedata->setMetadataFound(true); @@ -1960,7 +1960,7 @@ bool MainObject::RunPattern(const QString &pattern,const QString &filename, break; case 'w': - switch(subfield.toAscii()) { + switch(subfield.cell()) { case 'c': wavedata->setIsci(value); wavedata->setMetadataFound(true); @@ -2089,7 +2089,7 @@ bool MainObject::VerifyPattern(const QString &pattern) if(i>=(pattern.length()-1)) { return false; } - switch(pattern.at(++i).toAscii()) { + switch(pattern.at(++i).cell()) { case 'a': case 'b': case 'c': @@ -2117,7 +2117,7 @@ bool MainObject::VerifyPattern(const QString &pattern) if(i>=(pattern.length()-1)) { return false; } - switch(pattern.at(++i).toAscii()) { + switch(pattern.at(++i).cell()) { case 'i': case 'm': case 'r': diff --git a/utils/rdmaint/Makefile.am b/utils/rdmaint/Makefile.am index 793a2f5c..e474ae72 100644 --- a/utils/rdmaint/Makefile.am +++ b/utils/rdmaint/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdmaint_SOURCES = rdmaint.cpp rdmaint.h nodist_rdmaint_SOURCES = moc_rdmaint.cpp -rdmaint_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdmaint_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdmarkerset/Makefile.am b/utils/rdmarkerset/Makefile.am index 49a5b67a..9f3c73f3 100644 --- a/utils/rdmarkerset/Makefile.am +++ b/utils/rdmarkerset/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdmarkerset_SOURCES = rdmarkerset.cpp rdmarkerset.h nodist_rdmarkerset_SOURCES = moc_rdmarkerset.cpp -rdmarkerset_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdmarkerset_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = diff --git a/utils/rdmetadata/Makefile.am b/utils/rdmetadata/Makefile.am index d9a2afff..1811b359 100644 --- a/utils/rdmetadata/Makefile.am +++ b/utils/rdmetadata/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdmetadata_SOURCES = rdmetadata.cpp rdmetadata.h nodist_rdmetadata_SOURCES = moc_rdmetadata.cpp -rdmetadata_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdmetadata_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = diff --git a/utils/rdpopup/Makefile.am b/utils/rdpopup/Makefile.am index 753140d3..05deb070 100644 --- a/utils/rdpopup/Makefile.am +++ b/utils/rdpopup/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -29,7 +29,7 @@ bin_PROGRAMS = rdpopup dist_rdpopup_SOURCES = rdpopup.cpp rdpopup.h -rdpopup_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdpopup_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdpopup/rdpopup.cpp b/utils/rdpopup/rdpopup.cpp index 72e04060..93184f3d 100644 --- a/utils/rdpopup/rdpopup.cpp +++ b/utils/rdpopup/rdpopup.cpp @@ -2,7 +2,7 @@ // // A utility for displaying messages on the desktop // -// (C) Copyright 2009-2019 Fred Gleason +// (C) Copyright 2009-2021 Fred Gleason // // 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 @@ -18,10 +18,9 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // - -#include -#include -#include +#include +#include +#include #include #include @@ -62,8 +61,7 @@ int main(int argc,char *argv[]) QApplication::setStyle(RD_GUI_STYLE); QApplication a(argc,argv); - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdpopup",RDPOPUP_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rdpopup",RDPOPUP_USAGE); delete cmd; if(argc<2) { @@ -119,7 +117,7 @@ int main(int argc,char *argv[]) QMessageBox::NoButton); break; } - mb->setWindowIcon(QPixmap(rivendell_22x22_xpm)); + mb->setWindowIcon(QIcon(QPixmap(rivendell_22x22_xpm))); RDFontEngine *fs=new RDFontEngine(config); mb->setFont(fs->progressFont()); diff --git a/utils/rdrender/Makefile.am b/utils/rdrender/Makefile.am index 40886c2d..e0ac598b 100644 --- a/utils/rdrender/Makefile.am +++ b/utils/rdrender/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdrender_SOURCES = rdrender.cpp rdrender.h nodist_rdrender_SOURCES = moc_rdrender.cpp -rdrender_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdrender_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdselect_helper/Makefile.am b/utils/rdselect_helper/Makefile.am index 444caf33..8e37418f 100644 --- a/utils/rdselect_helper/Makefile.am +++ b/utils/rdselect_helper/Makefile.am @@ -17,7 +17,7 @@ ## ## Use automake to process this into a Makefile.in -AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@ +AM_CPPFLAGS = -Wall -DPREFIX=\"$(prefix)\" -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CLI_CFLAGS@ @MUSICBRAINZ_CFLAGS@ MOC = @QT_MOC@ # The dependency for qt's Meta Object Compiler (moc) @@ -36,7 +36,7 @@ nodist_rdselect_helper_SOURCES = moc_rdselect_helper.cpp\ rdconfig.cpp rdconfig.h\ rdprofile.cpp rdprofile.h -rdselect_helper_LDADD = -lQtCore -lQtNetwork @MUSICBRAINZ_LIBS@ +rdselect_helper_LDADD = @QT5_CLI_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.idb\ diff --git a/utils/rdselect_helper/rdselect_helper.cpp b/utils/rdselect_helper/rdselect_helper.cpp index c241b163..14ba54e7 100644 --- a/utils/rdselect_helper/rdselect_helper.cpp +++ b/utils/rdselect_helper/rdselect_helper.cpp @@ -43,17 +43,17 @@ MainObject::MainObject(QObject *parent) // // Process argument // - if(qApp->argc()!=2) { + if(qApp->arguments().size()!=2) { fprintf(stderr,"rdselect_helper: you must pass exactly one argument\n"); exit(RDConfig::RDSelectInvalidArguments); } - if(QString(qApp->argv()[1]).contains("/")|| - QString(qApp->argv()[1]).contains("..")) { + if(QString(qApp->arguments().at(1)).contains("/")|| + QString(qApp->arguments().at(1)).contains("..")) { fprintf(stderr,"rdselect_helper: invalid configuration name\n"); exit(RDConfig::RDSelectInvalidName); } helper_config_filename= - QString(RD_DEFAULT_RDSELECT_DIR)+"/"+QString(qApp->argv()[1]); + QString(RD_DEFAULT_RDSELECT_DIR)+"/"+QString(qApp->arguments().at(1)); // // Load Configurations diff --git a/utils/rdsoftkeys/Makefile.am b/utils/rdsoftkeys/Makefile.am index aa5a3dba..0a792baf 100644 --- a/utils/rdsoftkeys/Makefile.am +++ b/utils/rdsoftkeys/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -31,7 +31,7 @@ dist_rdsoftkeys_SOURCES = rdsoftkeys.cpp rdsoftkeys.h nodist_rdsoftkeys_SOURCES = moc_rdsoftkeys.cpp -rdsoftkeys_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdsoftkeys_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ CLEANFILES = *~\ *.exe\ diff --git a/utils/rdsoftkeys/rdsoftkeys.cpp b/utils/rdsoftkeys/rdsoftkeys.cpp index 25ebe652..c3b82df7 100644 --- a/utils/rdsoftkeys/rdsoftkeys.cpp +++ b/utils/rdsoftkeys/rdsoftkeys.cpp @@ -46,8 +46,7 @@ MainWidget::MainWidget(QWidget *parent) // RDConfig *config=new RDConfig(); QString map_filename=config->filename(); - RDCmdSwitch *cmd= - new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdsoftkeys",RDSOFTKEYS_USAGE); + RDCmdSwitch *cmd=new RDCmdSwitch("rdsoftkeys",RDSOFTKEYS_USAGE); for(unsigned i=0;ikeys();i++) { if(cmd->key(i)=="--map-file") { map_filename=cmd->value(i); diff --git a/utils/rmlsend/Makefile.am b/utils/rmlsend/Makefile.am index fed4302c..aa956bf7 100644 --- a/utils/rmlsend/Makefile.am +++ b/utils/rmlsend/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -43,7 +43,7 @@ dist_rmlsend_SOURCES = rmlsend.cpp rmlsend.h nodist_rmlsend_SOURCES = moc_rmlsend.cpp -rmlsend_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rmlsend_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rmlsend.pro\ rmlsend_cs.ts\ diff --git a/web/rdxport/Makefile.am b/web/rdxport/Makefile.am index 1c34524b..facd71f6 100644 --- a/web/rdxport/Makefile.am +++ b/web/rdxport/Makefile.am @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -51,7 +51,7 @@ dist_rdxport_cgi_SOURCES = audioinfo.cpp\ nodist_rdxport_cgi_SOURCES = moc_rdxport.cpp -rdxport_cgi_LDADD = @LIB_RDLIBS@ -lsndfile @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +rdxport_cgi_LDADD = @LIB_RDLIBS@ -lsndfile @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = rdxport.pro diff --git a/web/webget/Makefile.am b/web/webget/Makefile.am index 79cecc56..8ca2b176 100644 --- a/web/webget/Makefile.am +++ b/web/webget/Makefile.am @@ -1,6 +1,6 @@ ## Makefile.am ## -## (C) Copyright 2017-2020 Fred Gleason +## (C) Copyright 2017-2021 Fred Gleason ## ## 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 @@ -17,7 +17,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 MOC = @QT_MOC@ @@ -41,7 +41,7 @@ dist_webget_cgi_SOURCES = webget.cpp webget.h nodist_webget_cgi_SOURCES = moc_webget.cpp -webget_cgi_LDADD = @LIB_RDLIBS@ -lsndfile @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@ +webget_cgi_LDADD = @LIB_RDLIBS@ -lsndfile @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@ EXTRA_DIST = webget.js