mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2016-03-24 Fred Gleason <fredg@paravelsystems.com>
* Update web test methods in 'web/tests/'. * Added an 'RDSchedCode' class in 'lib/rdschedcode.cpp' and 'lib/rdschedcode.h'. * Implemented the 'ListSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'AssignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'UnassignSchedCode' web method in 'web/rdxport/schedcodes.cpp'. * Implemented the 'ListCartSchedCodes' web method in 'web/rdxport/schedcodes.cpp'. * Extended 'RDGetWebTime()' and 'RDGetWebDateTime()' functions to support XML 'xs' namespace formats. * Implemented '*_POINT' fields in the 'EditCut' web method in 'web/rdxport/carts.cpp'. * Modified the 'RDCart::removeSchedCode()' method so as to treat scheduler codes in a case-insensitve manner. * Modified the return of the 'EditCut' web method to provide a full <cutList> record in 'web/rdxport/carts.cpp'.
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
//
|
||||
// (C) Copyright 2009 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// $Id: rdformpost.cpp,v 1.3.2.1 2012/12/13 22:33:44 cvs Exp $
|
||||
//
|
||||
// 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
|
||||
// published by the Free Software Foundation.
|
||||
@@ -154,19 +152,22 @@ QVariant RDFormPost::value(const QString &name,bool *ok)
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,QHostAddress *addr)
|
||||
bool RDFormPost::getValue(const QString &name,QHostAddress *addr,bool *ok)
|
||||
{
|
||||
QString str;
|
||||
bool ok=getValue(name,&str);
|
||||
if(!ok) {
|
||||
bool lok=getValue(name,&str);
|
||||
if(!lok) {
|
||||
return false;
|
||||
}
|
||||
addr->setAddress(str);
|
||||
if(ok!=NULL) {
|
||||
*ok=addr->isNull();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,QString *str)
|
||||
bool RDFormPost::getValue(const QString &name,QString *str,bool *ok)
|
||||
{
|
||||
if(post_values.count(name)>0) {
|
||||
*str=post_values[name].toString();
|
||||
@@ -176,20 +177,20 @@ bool RDFormPost::getValue(const QString &name,QString *str)
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,int *n)
|
||||
bool RDFormPost::getValue(const QString &name,int *n,bool *ok)
|
||||
{
|
||||
if(post_values.count(name)>0) {
|
||||
*n=post_values[name].toInt();
|
||||
*n=post_values[name].toInt(ok);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,long *n)
|
||||
bool RDFormPost::getValue(const QString &name,long *n,bool *ok)
|
||||
{
|
||||
if(post_values.count(name)>0) {
|
||||
*n=post_values[name].toLongLong();
|
||||
*n=post_values[name].toLongLong(ok);
|
||||
return true;
|
||||
}
|
||||
*n=0;
|
||||
@@ -197,20 +198,36 @@ bool RDFormPost::getValue(const QString &name,long *n)
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,QDateTime *datetime)
|
||||
bool RDFormPost::getValue(const QString &name,QDateTime *datetime,bool *ok)
|
||||
{
|
||||
QString str;
|
||||
|
||||
if(ok!=NULL) {
|
||||
*ok=false;
|
||||
}
|
||||
if(!getValue(name,&str)) {
|
||||
return false;
|
||||
}
|
||||
*datetime=RDGetWebDateTime(str);
|
||||
if(str.length()==0) {
|
||||
*datetime=QDateTime();
|
||||
if(ok!=NULL) {
|
||||
*ok=true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
*datetime=RDGetWebDateTime(str,ok);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RDFormPost::getValue(const QString &name,QTime *time)
|
||||
bool RDFormPost::getValue(const QString &name,QTime *time,bool *ok)
|
||||
{
|
||||
QString str;
|
||||
|
||||
if(ok!=NULL) {
|
||||
*ok=false;
|
||||
}
|
||||
if(!getValue(name,&str)) {
|
||||
return false;
|
||||
}
|
||||
@@ -218,7 +235,7 @@ bool RDFormPost::getValue(const QString &name,QTime *time)
|
||||
*time=QTime();
|
||||
}
|
||||
else {
|
||||
*time=QTime().addMSecs(RDSetTimeLength(str));
|
||||
*time=RDGetWebTime(str,ok);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user