mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2018-11-15 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdadmin(1) that prevented login from a system with no host record in the database.
This commit is contained in:
@@ -18012,3 +18012,6 @@
|
|||||||
test harness.
|
test harness.
|
||||||
* Added an 'audio_metadata_test' test harness.
|
* Added an 'audio_metadata_test' test harness.
|
||||||
* Modified ID3 tag reading/writing to use TagLib.
|
* Modified ID3 tag reading/writing to use TagLib.
|
||||||
|
2018-11-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in rdadmin(1) that prevented login from a system with
|
||||||
|
no host record in the database.
|
||||||
|
@@ -145,15 +145,6 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type)
|
|||||||
// Open Accessors
|
// Open Accessors
|
||||||
//
|
//
|
||||||
app_station=new RDStation(app_config->stationName());
|
app_station=new RDStation(app_config->stationName());
|
||||||
if(!app_station->exists()) {
|
|
||||||
if(err_type!=NULL) {
|
|
||||||
*err_type=RDApplication::ErrorNoHostEntry;
|
|
||||||
}
|
|
||||||
*err_msg=QObject::tr("This host")+" (\""+app_config->stationName()+"\") "+
|
|
||||||
QObject::tr("does not have a Hosts entry in the database.")+"\n"+
|
|
||||||
QObject::tr("Open RDAdmin->ManageHosts->Add to create one.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
app_system=new RDSystem();
|
app_system=new RDSystem();
|
||||||
app_library_conf=new RDLibraryConf(app_config->stationName());
|
app_library_conf=new RDLibraryConf(app_config->stationName());
|
||||||
app_logedit_conf=new RDLogeditConf(app_config->stationName());
|
app_logedit_conf=new RDLogeditConf(app_config->stationName());
|
||||||
@@ -164,6 +155,16 @@ bool RDApplication::open(QString *err_msg,RDApplication::ErrorType *err_type)
|
|||||||
app_ripc=new RDRipc(app_station,app_config,this);
|
app_ripc=new RDRipc(app_station,app_config,this);
|
||||||
connect(app_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
connect(app_ripc,SIGNAL(userChanged()),this,SLOT(userChangedData()));
|
||||||
|
|
||||||
|
if(!app_station->exists()) {
|
||||||
|
if(err_type!=NULL) {
|
||||||
|
*err_type=RDApplication::ErrorNoHostEntry;
|
||||||
|
}
|
||||||
|
*err_msg=QObject::tr("This host")+" (\""+app_config->stationName()+"\") "+
|
||||||
|
QObject::tr("does not have a Hosts entry in the database.")+"\n"+
|
||||||
|
QObject::tr("Open RDAdmin->ManageHosts->Add to create one.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -82,6 +82,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
{
|
{
|
||||||
QString str;
|
QString str;
|
||||||
QString err_msg;
|
QString err_msg;
|
||||||
|
RDApplication::ErrorType err_type=RDApplication::ErrorOk;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fix the Window Size
|
// Fix the Window Size
|
||||||
@@ -110,9 +111,11 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
// Open the Database
|
// Open the Database
|
||||||
//
|
//
|
||||||
rda=new RDApplication("RDAdmin","rdadmin",RDADMIN_USAGE,this);
|
rda=new RDApplication("RDAdmin","rdadmin",RDADMIN_USAGE,this);
|
||||||
if(!rda->open(&err_msg)) {
|
if(!rda->open(&err_msg,&err_type)) {
|
||||||
QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg);
|
if(err_type!=RDApplication::ErrorNoHostEntry) {
|
||||||
exit(1);
|
QMessageBox::critical(this,"RDAdmin - "+tr("Error"),err_msg);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setWindowTitle(QString("RDAdmin v")+VERSION+" - "+
|
setWindowTitle(QString("RDAdmin v")+VERSION+" - "+
|
||||||
tr("Host")+": "+rda->config()->stationName());
|
tr("Host")+": "+rda->config()->stationName());
|
||||||
|
Reference in New Issue
Block a user