~ubuntu-branches/ubuntu/utopic/kde4libs/utopic

« back to all changes in this revision

Viewing changes to kio/kio/accessmanager.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:53:22 UTC
  • mfrom: (1.14.11)
  • Revision ID: package-import@ubuntu.com-20111216135322-joct6gdco90t3koc
Tags: 4:4.7.90-0ubuntu1
* New upstream beta release
* Remove kubuntu_mobile patches, kactivities is split out now and they 
  will be out of date, keep 
  kubuntu-mobile-07-serviceAvailabilityChanged-bool-signal.diff
  for binary compatibility reasons

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
    const QVariant size = req.header(QNetworkRequest::ContentLengthHeader);
64
64
    if (!size.isValid())
65
65
        return -1;
66
 
    return size.toLongLong();
 
66
    bool ok = false;
 
67
    const qlonglong value = size.toLongLong(&ok);
 
68
    return (ok ? value : -1);
67
69
}
68
70
 
69
71
namespace KIO {
252
254
            break;
253
255
        }
254
256
        case PostOperation: {
255
 
            //kDebug( 7044 ) << "PostOperation:" << reqUrl;
256
 
            const qint64 size = sizeFromRequest(req);
257
 
            //kDebug(7044) << "PostOperation: data size=" << size;
258
 
            kioJob = KIO::http_post(reqUrl, outgoingData, size, KIO::HideProgressInfo);
 
257
            kioJob = KIO::http_post(reqUrl, outgoingData, sizeFromRequest(req), KIO::HideProgressInfo);
259
258
            if (!metaData.contains(QL1S("content-type")))  {
260
259
                const QVariant header = req.header(QNetworkRequest::ContentTypeHeader);
261
260
                if (header.isValid()) {