mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-07 01:13:50 +02:00
2020-01-27 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'datdecode_test' that made it impossible to test empty strings.
This commit is contained in:
parent
0bc1268b00
commit
8f5716eaa9
@ -19426,3 +19426,6 @@
|
||||
2020-01-27 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'RDCmdSwitch' that caused empty argument values
|
||||
to be returned as a null QString.
|
||||
2020-01-27 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a bug in 'datdecode_test' that made it impossible to
|
||||
test empty strings.
|
||||
|
@ -33,8 +33,8 @@
|
||||
MainObject::MainObject(QObject *parent)
|
||||
:QObject(parent)
|
||||
{
|
||||
QString date="";
|
||||
QString datetime="";
|
||||
QString date;
|
||||
QString datetime;
|
||||
QString service="";
|
||||
int schema=0;
|
||||
|
||||
@ -63,12 +63,12 @@ MainObject::MainObject(QObject *parent)
|
||||
exit(256);
|
||||
}
|
||||
}
|
||||
if((!date.isEmpty())&&(!datetime.isEmpty())) {
|
||||
if((!date.isNull())&&(!datetime.isNull())) {
|
||||
fprintf(stderr,
|
||||
"datedecode_test: --date and --datetime are mutually exclusive\n");
|
||||
exit(256);
|
||||
}
|
||||
if(date.isEmpty()&&datetime.isEmpty()) {
|
||||
if(date.isNull()&&datetime.isNull()) {
|
||||
fprintf(stderr,
|
||||
"datedecode_test: you must specify either --date or --datetime\n");
|
||||
exit(256);
|
||||
@ -94,12 +94,12 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Process Code
|
||||
//
|
||||
if(!date.isEmpty()) {
|
||||
if(!date.isNull()) {
|
||||
printf("%s\n",
|
||||
(const char *)RDDateDecode(date,QDate::currentDate(),station,config,
|
||||
service));
|
||||
}
|
||||
if(!datetime.isEmpty()) {
|
||||
if(!datetime.isNull()) {
|
||||
printf("%s\n",(const char *)RDDateTimeDecode(datetime,
|
||||
QDateTime(QDate::currentDate(),QTime::currentTime()),station,
|
||||
config,service));
|
||||
|
Loading…
x
Reference in New Issue
Block a user