[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Get the source size from KIOSlave
From: David Faure <faure () kde ! org>
Date: 2012-07-17 11:30:53
Message-ID: 1459735.hDQUHZoaRQ () asterix ! site
[Download RAW message or body]
On Tuesday 17 July 2012 13:16:56 David Faure wrote:
> kdelibs patch attached, please test.
And now with a new feature: compiling.
Sorry, doing too many things at the same time :-)
--
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. KDE Frameworks 5
["kio_source_size.diff" (kio_source_size.diff)]
diff --git a/kio/DESIGN.metadata b/kio/DESIGN.metadata
index f97b251..c642122 100644
--- a/kio/DESIGN.metadata
+++ b/kio/DESIGN.metadata
@@ -29,6 +29,8 @@ referrer string The URL from which the request \
originates. (read
modified string The modification date of the document (set by http \
and by kio before put)
+sourceSize number The size of the source file, if known. (set by kio \
before put) +
accept string List of mimetypes to accept separated by a ", ". \
(read by http)
responsecode string Original response code of the web server. (set by \
http)
diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp
index a7e1baf..1e28a64 100644
--- a/kio/kio/job.cpp
+++ b/kio/kio/job.cpp
@@ -2189,6 +2189,9 @@ void FileCopyJobPrivate::startDataPump()
if ( m_modificationTime.isValid() ) {
m_putJob->setModificationTime( m_modificationTime );
}
+ if ( m_sourceSize != (KIO::filesize_t)-1 ) {
+ m_putJob->addMetaData("sourceSize", KIO::number(m_sourceSize));
+ }
// The first thing the put job will tell us is whether we can
// resume or not (this is always emitted)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic