2021-02-25 Fred Gleason <fredg@paravelsystems.com>

* Fixed various regressions in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-02-25 09:22:24 -05:00
parent 819af91cbe
commit 776e3ca842
16 changed files with 30 additions and 42 deletions

View File

@ -21198,3 +21198,5 @@
services.
* Fixed a regression in rdlibrary(1) that broke searching for 'ALL'
groups.
2021-02-25 Fred Gleason <fredg@paravelsystems.com>
* Fixed various regressions in rdadmin(1).

View File

@ -236,7 +236,7 @@ void RDStationListModel::refresh(const QModelIndex &row)
{
if(row.row()<d_texts.size()) {
QString sql=sqlFields()+
"where STATIONS.NAME=\""+RDEscapeString(d_hostnames.at(0))+"\"";
"where STATIONS.NAME=\""+RDEscapeString(d_hostnames.at(row.row()))+"\"";
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
updateRow(row.row(),q);

View File

@ -418,7 +418,7 @@ void EditCartSlots::ReadSlot(unsigned slotnum)
cartActionData(edit_cartaction_box->currentIndex());
modeData(edit_mode_box->currentIndex());
for(int i=0;i<edit_service_box->count();i++) {
if(q->value(7).toString()==edit_service_box->itemData(i).toString()) {
if(q->value(7).toString()==edit_service_box->itemText(i)) {
edit_service_box->setCurrentIndex(i);
}
}

View File

@ -645,22 +645,21 @@ void EditDecks::ReadRecord(int chan)
break;
}
for(int i=0;i<edit_swstation_box->count();i++) {
if(edit_record_deck->switchStation()==
edit_swstation_box->itemData(i).toString()) {
if(edit_record_deck->switchStation()==edit_swstation_box->itemText(i)) {
edit_swstation_box->setCurrentIndex(i);
stationActivatedData(edit_swstation_box->currentText());
}
}
QString matrix_name=edit_record_deck->switchMatrixName();
for(int i=0;i<edit_swmatrix_box->count();i++) {
if(edit_swmatrix_box->itemData(i).toString()==matrix_name) {
if(edit_swmatrix_box->itemText(i)==matrix_name) {
edit_swmatrix_box->setCurrentIndex(i);
matrixActivatedData(edit_swmatrix_box->currentText());
}
}
QString output_name=edit_record_deck->switchOutputName();
for(int i=0;i<edit_swoutput_box->count();i++) {
if(edit_swoutput_box->itemData(i).toString()==output_name) {
if(edit_swoutput_box->itemText(i)==output_name) {
edit_swoutput_box->setCurrentIndex(i);
}
}

View File

@ -950,7 +950,7 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station,
air_countto_box->setCurrentIndex(air_conf->pieEndPoint());
air_default_transtype_box->setCurrentIndex(air_conf->defaultTransType());
for(int i=0;i<air_defaultsvc_box->count();i++) {
if(air_defaultsvc_box->itemData(i).toString()==air_conf->defaultSvc()) {
if(air_defaultsvc_box->itemText(i)==air_conf->defaultSvc()) {
air_defaultsvc_box->setCurrentIndex(i);
break;
}

View File

@ -76,7 +76,6 @@ EditStation::EditStation(QString sname,QWidget *parent)
// Models
//
station_username_model=new RDUserListModel(this);
station_station_model=new RDStationListModel(false,sname,this);
//
// Station Name
@ -303,7 +302,8 @@ EditStation::EditStation(QString sname,QWidget *parent)
//
station_http_station_box=new RDComboBox(this);
station_http_station_box->setEditable(false);
station_http_station_box->setModel(station_station_model);
station_http_station_model=new RDStationListModel(false,sname,this);
station_http_station_box->setModel(station_http_station_model);
station_http_station_label=new QLabel(tr("HTTP Xport:"),this);
station_http_station_label->setFont(labelFont());
station_http_station_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
@ -313,7 +313,8 @@ EditStation::EditStation(QString sname,QWidget *parent)
//
station_cae_station_box=new RDComboBox(this);
station_cae_station_box->setEditable(false);
station_cae_station_box->setModel(station_station_model);
station_cae_station_model=new RDStationListModel(false,sname,this);
station_cae_station_box->setModel(station_cae_station_model);
connect(station_cae_station_box,SIGNAL(activated(const QString &)),
this,SLOT(caeStationActivatedData(const QString &)));
station_cae_station_label=new QLabel(tr("Core Audio Engine:"),this);
@ -537,12 +538,10 @@ EditStation::EditStation(QString sname,QWidget *parent)
station_http_station_box->setCurrentText(station_station->httpStation());
station_cae_station_box->setCurrentText(station_station->caeStation());
for(int i=0;i<station_http_station_box->count();i++) {
if(station_http_station_box->itemData(i).toString()==
station_station->httpStation()) {
if(station_http_station_box->itemText(i)==station_station->httpStation()) {
station_http_station_box->setCurrentIndex(i);
}
if(station_cae_station_box->itemData(i).toString()==
station_station->caeStation()) {
if(station_cae_station_box->itemText(i)==station_station->caeStation()) {
station_cae_station_box->setCurrentIndex(i);
}
}
@ -554,7 +553,8 @@ EditStation::~EditStation()
delete station_station;
delete station_cae_station;
delete station_username_model;
delete station_station_model;
delete station_http_station_model;
delete station_cae_station_model;
}

View File

@ -134,9 +134,10 @@ class EditStation : public RDDialog
QGroupBox *station_systemservices_groupbox;
QLabel *station_http_station_label;
RDComboBox *station_http_station_box;
RDStationListModel *station_http_station_model;
QLabel *station_cae_station_label;
RDComboBox *station_cae_station_box;
RDStationListModel *station_station_model;
RDStationListModel *station_cae_station_model;
QPushButton *station_rdlibrary_button;
QPushButton *station_rdcatch_button;
QPushButton *station_rdairplay_button;

View File

@ -34,9 +34,6 @@
EditSystem::EditSystem(QWidget *parent)
: RDDialog(parent)
{
QString sql;
RDSqlQuery *q;
y_pos=0;
//
@ -51,6 +48,7 @@ EditSystem::EditSystem(QWidget *parent)
edit_system=new RDSystem();
edit_encoders_dialog=new ListEncoders(this);
edit_station_list_model=new RDStationListModel(true,"",this);
//
// System Sample Rate
@ -156,14 +154,7 @@ EditSystem::EditSystem(QWidget *parent)
// RSS Processor Host
//
edit_rss_processor_box=new QComboBox(this);
sql=QString("select NAME from STATIONS order by NAME");
q=new RDSqlQuery(sql);
edit_rss_processor_box->insertItem(0,tr("[none]"));
while(q->next()) {
edit_rss_processor_box->insertItem(edit_rss_processor_box->count(),
q->value(0).toString());
}
delete q;
edit_rss_processor_box->setModel(edit_station_list_model);
edit_rss_processor_label=new QLabel(tr("Process RSS Updates On")+":",this);
edit_rss_processor_label->setFont(labelFont());
edit_rss_processor_label->
@ -231,13 +222,13 @@ EditSystem::EditSystem(QWidget *parent)
QString station=edit_system->rssProcessorStation();
for(int i=0;i<edit_rss_processor_box->count();i++) {
if(edit_rss_processor_box->itemData(i).toString()==station) {
if(edit_rss_processor_box->itemText(i)==station) {
edit_rss_processor_box->setCurrentIndex(i);
}
}
for(int i=0;i<edit_sample_rate_box->count();i++) {
if(edit_sample_rate_box->itemData(i).toString().toUInt()==
if(edit_sample_rate_box->itemText(i).toUInt()==
edit_system->sampleRate()) {
edit_sample_rate_box->setCurrentIndex(i);
}
@ -248,6 +239,7 @@ EditSystem::EditSystem(QWidget *parent)
EditSystem::~EditSystem()
{
delete edit_station_list_model;
delete edit_system;
delete edit_encoders_dialog;
delete edit_duplicate_carts_box;

View File

@ -32,6 +32,7 @@
#include <rddialog.h>
#include <rdgrouplistmodel.h>
#include <rdlibrarymodel.h>
#include <rdstationlistmodel.h>
#include <rdsystem.h>
#include <rdtableview.h>
@ -92,6 +93,7 @@ class EditSystem : public RDDialog
RDSystem *edit_system;
ListEncoders *edit_encoders_dialog;
int y_pos;
RDStationListModel *edit_station_list_model;
};

View File

@ -4469,7 +4469,7 @@ Custom</source>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[žádný]</translation>
<translation type="obsolete">[žádný]</translation>
</message>
<message>
<source>Process RSS Updates On</source>

View File

@ -4145,7 +4145,7 @@ Custom</source>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[keine]</translation>
<translation type="obsolete">[keine]</translation>
</message>
<message>
<source>Process RSS Updates On</source>

View File

@ -4408,10 +4408,6 @@ Custom</source>
<source>Show User List in RDLogin</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Process RSS Updates On</source>
<translation type="unfinished"></translation>

View File

@ -3267,10 +3267,6 @@ Custom</source>
<source>Show User List in RDLogin</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Process RSS Updates On</source>
<translation type="unfinished"></translation>

View File

@ -4050,7 +4050,7 @@ Custom</source>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[ingen]</translation>
<translation type="obsolete">[ingen]</translation>
</message>
<message>
<source>Process RSS Updates On</source>

View File

@ -4050,7 +4050,7 @@ Custom</source>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[ingen]</translation>
<translation type="obsolete">[ingen]</translation>
</message>
<message>
<source>Process RSS Updates On</source>

View File

@ -4125,7 +4125,7 @@ Custom</source>
</message>
<message>
<source>[none]</source>
<translation type="unfinished">[Nenhum]</translation>
<translation type="obsolete">[Nenhum]</translation>
</message>
<message>
<source>Process RSS Updates On</source>