mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2018-02-01 Fred Gleason <fredg@paravelsystems.com>
* Moved command-switch processing into RDApplication.
This commit is contained in:
@@ -84,16 +84,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
setMaximumHeight(sizeHint().height());
|
||||
#endif // RESIZABLE
|
||||
|
||||
//
|
||||
// Load the command-line arguments
|
||||
//
|
||||
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdpanel",
|
||||
RDPANEL_USAGE);
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
if(cmd->key(i)=="--skip-db-check") {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Generate Fonts
|
||||
//
|
||||
@@ -111,12 +101,27 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
RDInitializeDaemons();
|
||||
|
||||
rda=new RDApplication("RDPanel",this);
|
||||
//
|
||||
// Open the Database
|
||||
//
|
||||
rda=new RDApplication("RDPanel","rdpanel",RDPANEL_USAGE,this);
|
||||
if(!rda->open(&err_msg)) {
|
||||
QMessageBox::critical(this,"RDPanel - "+tr("Error"),err_msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//
|
||||
// Read Command Options
|
||||
//
|
||||
for(unsigned i=0;i<rda->cmdSwitch()->keys();i++) {
|
||||
if(!rda->cmdSwitch()->processed(i)) {
|
||||
QMessageBox::critical(this,"RDPanel - "+tr("Error"),
|
||||
tr("Unknown command option")+": "+
|
||||
rda->cmdSwitch()->key(i));
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Master Clock Timer
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user