mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 23:30:20 +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
|
||||
//
|
||||
|
||||
@@ -21,5 +21,9 @@
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -13,5 +13,9 @@
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -21,5 +21,9 @@
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -13,5 +13,9 @@
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
@@ -13,5 +13,9 @@
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown command option</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
||||
Reference in New Issue
Block a user