diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2011-04-01 12:58:26 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2011-04-01 14:02:17 (GMT) |
commit | 151e48fef2a74a7d153a5a8eaff1088a4b1a9043 (patch) | |
tree | 4c23dcbe59d80d726761f1080646588855b41a61 /src | |
parent | a3b79f7449fc960da1b3ae39e0127c875c43b90f (diff) | |
download | Qt-151e48fef2a74a7d153a5a8eaff1088a4b1a9043.zip Qt-151e48fef2a74a7d153a5a8eaff1088a4b1a9043.tar.gz Qt-151e48fef2a74a7d153a5a8eaff1088a4b1a9043.tar.bz2 |
QNetworkDiskCache: clean up after merge request
changes include whitespace, parenting, recovering erroneously deleted
code etc.
Reviewed-by: Markus Goetz
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkdiskcache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp index a5c0b3d..271494d 100644 --- a/src/network/access/qnetworkdiskcache.cpp +++ b/src/network/access/qnetworkdiskcache.cpp @@ -261,12 +261,11 @@ void QNetworkDiskCachePrivate::prepareLayout() //Create directory and subdirectories 0-F helper.mkpath(dataDirectory); - for ( uint i = 0; i < 16 ; i++ ) { + for (uint i = 0; i < 16 ; i++) { QString str = QString::number(i, 16); QString subdir = dataDirectory + str; helper.mkdir(subdir); } - } @@ -435,6 +434,7 @@ QIODevice *QNetworkDiskCache::data(const QUrl &url) #endif if (p) { buffer->setData((const char *)p, size); + file.take()->setParent(buffer.data()); } else { buffer->setData(file->readAll()); } @@ -605,7 +605,7 @@ QString QNetworkDiskCachePrivate::uniqueFileName(const QUrl &url) QByteArray id = QByteArray::number(*(qlonglong*)hash.result().data(), 36).left(8); // generates <one-char subdir>/<8-char filname.d> uint code = (uint)id.at(id.length()-1) % 16; - QString pathFragment = QString::number(code, 16) + QLatin1String("/") + QString pathFragment = QString::number(code, 16) + QLatin1Char('/') + QLatin1String(id) + CACHE_POSTFIX; return pathFragment; @@ -618,7 +618,7 @@ QString QNetworkDiskCachePrivate::tmpCacheFileName() const } /*! - Genrates fully qualified path of cached resource from a URL. + Generates fully qualified path of cached resource from a URL. */ QString QNetworkDiskCachePrivate::cacheFileName(const QUrl &url) const { |