[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepimlibs/kxmlrpcclient
From: Antonio Aloisio <antonio.aloisio () gmail ! com>
Date: 2007-09-08 23:10:41
Message-ID: 1189293041.661121.29893.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 710028 by aloisio:
Removed extended/basic format selection for dateTime.
M +2 -26 client.cpp
M +0 -34 client.h
M +3 -23 query.cpp
M +2 -5 query.h
--- trunk/KDE/kdepimlibs/kxmlrpcclient/client.cpp #710027:710028
@@ -36,17 +36,13 @@
class Client::Private
{
public:
- Private() : mUserAgent( "KDE XMLRPC resources" ), mDigestAuth( false )
- , mDateFormatExtended(true)
- , mTimeFormatExtended(true){}
+ Private() : mUserAgent( "KDE XMLRPC resources" ), mDigestAuth( false ){}
void queryFinished( Query * );
KUrl mUrl;
QString mUserAgent;
bool mDigestAuth;
- bool mDateFormatExtended;
- bool mTimeFormatExtended;
QList<Query*> mPendingQueries;
};
@@ -99,26 +95,6 @@
d->mUserAgent = userAgent;
}
-void Client::setUseExtendedDateFormat( bool extended )
-{
- d->mDateFormatExtended=extended;
-}
-
-void Client::setUseExtendedTimeFormat( bool extended )
-{
- d->mDateFormatExtended=extended;
-}
-
-bool Client::useExtendedDateFormat() const
-{
- return d->mDateFormatExtended;
-}
-
-bool Client::useExtendedTimeFormat() const
-{
- return d->mTimeFormatExtended;
-}
-
bool Client::isDigestAuthEnabled() const
{
return d->mDigestAuth;
@@ -157,7 +133,7 @@
connect( query, SIGNAL( finished( Query * ) ), this, SLOT( queryFinished( Query * \
) ) ); d->mPendingQueries.append( query );
- query->call( d->mUrl.url(), method, args, metaData, d->mDateFormatExtended, \
d->mTimeFormatExtended ); + query->call( d->mUrl.url(), method, args, metaData );
}
void Client::call( const QString &method, const QVariant &arg,
--- trunk/KDE/kdepimlibs/kxmlrpcclient/client.h #710027:710028
@@ -108,40 +108,6 @@
void setUserAgent( const QString &userAgent );
/**
- Sets the Date Format the Client will use.
- extended format: YYYY-MM-DD
- basic format: YYYYMMDD
- @param extended true extended format will be used.
-
- @see useExtendedDateFormat()
- */
- void setUseExtendedDateFormat( bool extended );
-
- /**
- Sets the Time Format the Client will use.
- extended format: HH:MM:SS
- basic format: HHMMSS
- @param extended true extended format will be used.
-
- @see useExtendedTimeFormat()
- */
- void setUseExtendedTimeFormat( bool extended );
-
- /**
- Returns true if the date format is extended
-
- @see setUseExtendedDateFormat()
- */
- bool useExtendedDateFormat() const;
-
- /**
- Returns true if the time format is extended
-
- @see setUseExtendedTimeFormat()
- */
- bool useExtendedTimeFormat() const;
-
- /**
Returns true if HTTP-Digest authentication is enabled, false
if not.
--- trunk/KDE/kdepimlibs/kxmlrpcclient/query.cpp #710027:710028
@@ -150,8 +150,6 @@
QByteArray mBuffer;
QVariant mId;
QList<KJob*> mPendingJobs;
- bool mDateFormatExtended;
- bool mTimeFormatExtended;
};
bool Query::Private::isMessageResponse( const QDomDocument &doc ) const
@@ -249,22 +247,7 @@
return "<value><base64>" + arg.toByteArray().toBase64() + \
"</base64></value>\r\n"; case QVariant::DateTime:
{
- QString date;
- QString time;
-
- if ( mTimeFormatExtended ) {
- time = arg.toDateTime().time().toString( Qt::ISODate );
- } else {
- time = arg.toDateTime().time().toString( "hhmmss" );
- }
-
- if ( mDateFormatExtended ) {
- date = arg.toDateTime().date().toString( Qt::ISODate );
- } else {
- date = arg.toDateTime().date().toString( "yyyyMMdd" );
- }
-
- return "<value><dateTime.iso8601>" + date + 'T' + time + \
"</dateTime.iso8601></value>\r\n"; + return "<value><dateTime.iso8601>" + \
arg.toDateTime().toString( Qt::ISODate ) + "</dateTime.iso8601></value>\r\n"; }
case QVariant::List:
{
@@ -416,12 +399,9 @@
void Query::call( const QString &server,
const QString &method,
const QList<QVariant> &args,
- const QMap<QString, QString> &jobMetaData,
- const bool dateFormatExtended,
- const bool timeFormatExtended )
+ const QMap<QString, QString> &jobMetaData)
{
- d->mDateFormatExtended=dateFormatExtended;
- d->mTimeFormatExtended=timeFormatExtended;
+
const QString xmlMarkup = d->markupCall( method, args );
QMap<QString, QString>::const_iterator mapIter;
--- trunk/KDE/kdepimlibs/kxmlrpcclient/query.h #710027:710028
@@ -64,14 +64,11 @@
@param method the method to call.
@param args an argument list to pass to said method.
@param jobMetaData additional arguments to pass to the KIO::Job.
- @param dateFormatExtended an optional parameter
- @param timeFormatExtended an optional parameter
*/
void call( const QString &server, const QString &method,
const QList<QVariant> &args,
- const QMap<QString, QString> &jobMetaData,
- const bool dateFormatExtended,
- const bool timeFormatExtended);
+ const QMap<QString, QString> &jobMetaData
+ );
Q_SIGNALS:
/**
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic