2021-01-20 Fred Gleason <fredg@paravelsystems.com>

* Split the 'RDApplication' class into the base class
	'RDCoreApplication' and 'RDApplication'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-01-20 19:50:24 -05:00
parent 1b5a800783
commit a3525c88e2
54 changed files with 1475 additions and 1370 deletions

View File

@@ -42,7 +42,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdcheckcuts","rdcheckcuts",RDCHECKCUTS_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdcheckcuts","rdcheckcuts",RDCHECKCUTS_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdcheckcuts: %s\n",(const char *)err_msg);
exit(1);

View File

@@ -50,7 +50,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdclilogedit","rdclilogedit",RDCLILOGEDIT_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdclilogedit","rdclilogedit",RDCLILOGEDIT_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdclilogedit: %s\n",(const char *)err_msg);
exit(1);

View File

@@ -42,7 +42,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdconvert","rdconvert",RDCONVERT_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdconvert","rdconvert",RDCONVERT_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdconvert: %s\n",(const char *)err_msg);
exit(1);

View File

@@ -43,7 +43,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rddelete","rddelete",RDDELETE_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rddelete","rddelete",RDDELETE_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rddelete: %s\n",(const char *)err_msg);
exit(1);
@@ -329,7 +329,7 @@ bool MainObject::GetNextStdinObject(QString *logname)
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}

View File

@@ -2,7 +2,7 @@
//
// A Batch Exporter for Rivendell.
//
// (C) Copyright 2016-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2016-2021 Fred Gleason <fredg@paravelsystems.com>
//
// 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
@@ -57,7 +57,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdexport","rdexport",RDEXPORT_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdexport","rdexport",RDEXPORT_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdexport: %s\n",(const char *)err_msg.toUtf8());
exit(1);
@@ -564,7 +564,7 @@ void MainObject::Verbose(const QString &msg)
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}

View File

@@ -105,7 +105,8 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdimport","rdimport",RDIMPORT_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdimport","rdimport",
RDIMPORT_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdimport: %s\n",(const char *)err_msg);
ErrorExit(RDApplication::ExitNoDb);

View File

@@ -2,7 +2,7 @@
//
// A Utility for running periodic system maintenance.
//
// (C) Copyright 2008-2020 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2008-2021 Fred Gleason <fredg@paravelsystems.com>
//
// 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
@@ -59,7 +59,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdmaint","rdmaint",RDMAINT_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmaint","rdmaint",RDMAINT_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdmaint: %s\n",(const char *)err_msg);
exit(1);
@@ -428,7 +428,7 @@ void MainObject::RehashCuts()
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}

View File

@@ -61,7 +61,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdmarkerset","rdmarkerset",RDMARKERSET_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmarkerset","rdmarkerset",RDMARKERSET_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdmarkerset: %s\n",(const char *)err_msg);
exit(1);
@@ -393,7 +393,7 @@ void MainObject::Print(const QString &msg)
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}

View File

@@ -52,7 +52,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdmetadata","rdmetadata",RDMETADATA_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdmetadata","rdmetadata",RDMETADATA_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdmetadata: %s\n",(const char *)err_msg);
exit(1);
@@ -306,7 +306,7 @@ void MainObject::Print(const QString &msg)
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}

View File

@@ -69,7 +69,7 @@ MainObject::MainObject(QObject *parent)
//
// Open the Database
//
rda=new RDApplication("rdrender","rdrender",RDRENDER_USAGE,this);
rda=static_cast<RDApplication *>(new RDCoreApplication("rdrender","rdrender",RDRENDER_USAGE,this));
if(!rda->open(&err_msg)) {
fprintf(stderr,"rdrender: %s\n",(const char *)err_msg.toUtf8());
exit(1);
@@ -337,7 +337,7 @@ void MainObject::printProgressMessage(const QString &msg)
int main(int argc,char *argv[])
{
QApplication a(argc,argv,false);
QCoreApplication a(argc,argv,false);
new MainObject();
return a.exec();
}